From df6579622a2a8404ab44167ad1bac736d20ba92e Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 9 Jul 2020 17:35:18 +0200 Subject: [PATCH] undef values should never be encoded --- lib/query-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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