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 {