We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8e012e commit ac53b49Copy full SHA for ac53b49
1 file changed
src/persisters/common/database/postgresql.ts
@@ -59,10 +59,14 @@ export const createCustomPostgreSqlPersister = <
59
60
const getWhenCondition = (tableName: string, newOrOld: 'NEW' | 'OLD') => {
61
const tablesLoadConfig = defaultedConfig[0];
62
- if(!tablesLoadConfig || typeof tablesLoadConfig === 'string') return 'true';
+ if (!tablesLoadConfig || typeof tablesLoadConfig === 'string') {
63
+ return 'true';
64
+ }
65
- const [,,condition] = tablesLoadConfig.get(tableName) ?? [];
- if(!condition) return 'true';
66
+ const [, , condition] = tablesLoadConfig.get(tableName) ?? [];
67
+ if (!condition) {
68
69
70
71
return condition.replace(TABLE_NAME_PLACEHOLDER, newOrOld);
72
};
0 commit comments