fix issue with 0 evaluating to false in query builder
This commit is contained in:
parent
a06b1b4310
commit
18671d24b7
|
@ -191,7 +191,8 @@ class QueryBuilder {
|
|||
}
|
||||
if (this.query.equal) {
|
||||
build(this.query.equal, (key, value) => {
|
||||
if (!value) {
|
||||
// 0 evaluates to false, which means we would return all rows if we don't check it
|
||||
if (!value && value !== 0) {
|
||||
return null
|
||||
}
|
||||
return `${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
||||
|
|
Loading…
Reference in New Issue