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 ae92729 commit 123682cCopy full SHA for 123682c
lib/dialects/base/blocks.js
@@ -148,7 +148,7 @@ module.exports = function (dialect) {
148
dialect.blocks.add('condition', (parameters) => {
149
const { condition } = parameters;
150
151
- if (isUndefined(condition)) {
+ if (isUndefined(condition) || condition === null) {
152
return '';
153
}
154
@@ -158,7 +158,8 @@ module.exports = function (dialect) {
158
);
159
160
161
- return 'where ' + dialect.buildCondition(condition);
+ const conditionString = dialect.buildCondition(condition);
162
+ return conditionString ? 'where ' + conditionString : '';
163
});
164
165
dialect.blocks.add('modifier', (parameters) => {
0 commit comments