diff --git a/lib/query-stream.js b/lib/query-stream.js index bd58712..e146e02 100644 --- a/lib/query-stream.js +++ b/lib/query-stream.js @@ -22,7 +22,7 @@ class QueryStream extends Readable { this.command = command this.target = target - this.value = cmd ? cmd.inputEncoding.encode(value) : (value || null) + this.value = (cmd && value) ? cmd.inputEncoding.encode(value) : (value || null) this.update = !!opts.update this.query = !!opts.query || !opts.update this.destroyed = false