mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
fix: ensure extract always return an array
This commit is contained in:
@@ -297,10 +297,12 @@ export class SqlGenerator {
|
||||
}
|
||||
|
||||
extract(objectTypeField) {
|
||||
return this.dbinfo[objectTypeField].filter(x =>
|
||||
this.objects.find(
|
||||
y => x.pureName == y.pureName && x.schemaName == y.schemaName && y.objectTypeField == objectTypeField
|
||||
)
|
||||
return (
|
||||
this.dbinfo[objectTypeField]?.filter(x =>
|
||||
this.objects.find(
|
||||
y => x.pureName == y.pureName && x.schemaName == y.schemaName && y.objectTypeField == objectTypeField
|
||||
)
|
||||
) ?? []
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user