From d5cf7c7a9d7db58bb6a5dff9643bcd0a10c3c469 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 5 Jan 2022 10:28:36 +0000 Subject: [PATCH] Reset bind if msg.payload not an array should fix #870 --- storage/sqlite/sqlite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/sqlite/sqlite.js b/storage/sqlite/sqlite.js index fc04aad2..c0648db6 100644 --- a/storage/sqlite/sqlite.js +++ b/storage/sqlite/sqlite.js @@ -56,7 +56,7 @@ module.exports = function(RED) { if (Array.isArray(msg.payload)) { if (msg.payload.length === (msg.topic.split('$').length - 1) ) { bind = msg.payload; } else { bind = []; } - } + } else { bind = []; } node.mydbConfig.db.all(msg.topic, bind, function(err, row) { if (err) { node.error(err,msg); } else {