Skip to content

Commit 202c6aa

Browse files
committed
fix: improve table name extraction in EnhancedQueryLogger
1 parent 9073d9b commit 202c6aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/enhanced-query-logger.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ export class EnhancedQueryLogger implements Logger {
3333
];
3434

3535
for (const pattern of patterns) {
36-
const match = query.match(pattern);
37-
if (match) return match[1];
36+
const [match] = query.match(pattern) ?? [];
37+
return match ?? null;
3838
}
39+
3940
return null;
4041
}
4142

0 commit comments

Comments
 (0)