mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 11:03:57 +00:00
Merge pull request #1011 from dbgate/feature/null-safety-to-sql-generator
fix: ensure extract always return an array
This commit is contained in:
@@ -297,10 +297,12 @@ export class SqlGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extract(objectTypeField) {
|
extract(objectTypeField) {
|
||||||
return this.dbinfo[objectTypeField].filter(x =>
|
return (
|
||||||
this.objects.find(
|
this.dbinfo[objectTypeField]?.filter(x =>
|
||||||
y => x.pureName == y.pureName && x.schemaName == y.schemaName && y.objectTypeField == objectTypeField
|
this.objects.find(
|
||||||
)
|
y => x.pureName == y.pureName && x.schemaName == y.schemaName && y.objectTypeField == objectTypeField
|
||||||
|
)
|
||||||
|
) ?? []
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user