fix issue with 0 evaluating to false in query builder
This commit is contained in:
parent
8d57ae93b3
commit
3327c4dc6f
|
@ -191,7 +191,8 @@ class QueryBuilder {
|
||||||
}
|
}
|
||||||
if (this.query.equal) {
|
if (this.query.equal) {
|
||||||
build(this.query.equal, (key, value) => {
|
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 null
|
||||||
}
|
}
|
||||||
return `${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
return `${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
||||||
|
|
Loading…
Reference in New Issue