1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

sqlite - fix fixed statement check

This commit is contained in:
Dave Conway-Jones 2018-08-24 15:23:37 +01:00
parent c59c05c693
commit a94157efe6
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-node-sqlite", "name": "node-red-node-sqlite",
"version": "0.3.4", "version": "0.3.5",
"description": "A sqlite node for Node-RED", "description": "A sqlite node for Node-RED",
"dependencies": { "dependencies": {
"sqlite3": "^4.0.2" "sqlite3": "^4.0.2"

View File

@ -86,8 +86,7 @@ module.exports = function(RED) {
} }
if (node.sqlquery == "fixed"){ if (node.sqlquery == "fixed"){
if (typeof node.sql === 'string') { if (typeof node.sql === 'string') {
if (msg.payload && msg.payload.length > 0) { if (node.sql.length > 0) {
bind = Array.isArray(msg.payload) ? msg.payload : [];
node.mydbConfig.db.all(node.sql, bind, function(err, row) { node.mydbConfig.db.all(node.sql, bind, function(err, row) {
if (err) { node.error(err,msg); } if (err) { node.error(err,msg); }
else { else {