From a94157efe60f83d938d75e6e8a19bb909d03c11c Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 24 Aug 2018 15:23:37 +0100 Subject: [PATCH] sqlite - fix fixed statement check --- storage/sqlite/package.json | 2 +- storage/sqlite/sqlite.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/storage/sqlite/package.json b/storage/sqlite/package.json index cc31580a..9dd66ecb 100644 --- a/storage/sqlite/package.json +++ b/storage/sqlite/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-sqlite", - "version": "0.3.4", + "version": "0.3.5", "description": "A sqlite node for Node-RED", "dependencies": { "sqlite3": "^4.0.2" diff --git a/storage/sqlite/sqlite.js b/storage/sqlite/sqlite.js index 540e21e4..27a92cad 100644 --- a/storage/sqlite/sqlite.js +++ b/storage/sqlite/sqlite.js @@ -86,8 +86,7 @@ module.exports = function(RED) { } if (node.sqlquery == "fixed"){ if (typeof node.sql === 'string') { - if (msg.payload && msg.payload.length > 0) { - bind = Array.isArray(msg.payload) ? msg.payload : []; + if (node.sql.length > 0) { node.mydbConfig.db.all(node.sql, bind, function(err, row) { if (err) { node.error(err,msg); } else {