From f9b4d2ec0101548ce644d7f94055460d94019f85 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 5 Jan 2022 11:43:16 +0000 Subject: [PATCH] Sqlite3 fix (#872) * Reset bind if msg.payload not an array --- storage/sqlite/package.json | 2 +- storage/sqlite/sqlite.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/sqlite/package.json b/storage/sqlite/package.json index 6060e957..a21715a6 100644 --- a/storage/sqlite/package.json +++ b/storage/sqlite/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-sqlite", - "version": "1.0.1", + "version": "1.0.2", "description": "A sqlite node for Node-RED", "dependencies": { "sqlite3": "^5.0.2" diff --git a/storage/sqlite/sqlite.js b/storage/sqlite/sqlite.js index fc04aad2..4e4080a0 100644 --- a/storage/sqlite/sqlite.js +++ b/storage/sqlite/sqlite.js @@ -50,6 +50,7 @@ module.exports = function(RED) { var bind = []; var doQuery = function(msg) { + bind = [] if (node.sqlquery == "msg.topic") { if (typeof msg.topic === 'string') { if (msg.topic.length > 0) {