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",
"version": "0.3.4",
"version": "0.3.5",
"description": "A sqlite node for Node-RED",
"dependencies": {
"sqlite3": "^4.0.2"

View File

@ -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 {