Skip to content

Commit 9e1ae70

Browse files
committed
fix: do not fallback to public if schemaName is empty string
1 parent bd3ee4d commit 9e1ae70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/dbml-core/src/model_structure/database.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ class Database extends Element {
174174

175175
// Link records to tables using the map
176176
this.records.forEach((record) => {
177-
// Fallback to 'public' if schemaName is null, undefined, or empty string
178-
const schemaName = record.schemaName || DEFAULT_SCHEMA_NAME;
177+
// Fallback to 'public' if schemaName is null, undefined
178+
const schemaName = record.schemaName ?? DEFAULT_SCHEMA_NAME;
179179
const table = tableMap[schemaName]?.[record.tableName];
180180
if (!table) return;
181181

0 commit comments

Comments
 (0)