Skip to content

Commit a1a279b

Browse files
committed
Fix tableName regression.
1 parent 9798f25 commit a1a279b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/sync-rules/src/sql_filters.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ export class SqlTools {
613613
}
614614
const tableName = ref.table?.name ?? this.default_table;
615615
if (this.value_tables.includes(tableName ?? '')) {
616-
return ref.table!.name;
617-
} else if (tableName == null) {
616+
return tableName;
617+
} else if (ref.table?.name == null) {
618618
throw new SqlRuleError(`Table name required`, this.sql, ref);
619619
} else {
620620
throw new SqlRuleError(`Undefined table ${tableName}`, this.sql, ref);

0 commit comments

Comments
 (0)