node-red-contrib-spark
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,5 @@ | ||
#### 2.0.2: Maintenance Release | ||
- updated api node handling of empty responses | ||
#### 2.0.1: Maintenance Release | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "node-red-contrib-spark", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Node-RED Nodes to integrate with the Cisco Spark API", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -200,3 +200,3 @@ module.exports = function(RED) { | ||
// if response is array of items | ||
if(typeof data === 'object' && data.hasOwnProperty('items') && data.items instanceof Array && data.items.length > 0) { | ||
if(typeof data === 'object' && data.hasOwnProperty('items') && data.items instanceof Array) { | ||
@@ -240,10 +240,3 @@ // if as multiple messages | ||
// else, if response is empty array of items | ||
else if(typeof data === 'object' && data.hasOwnProperty('items') && data.items instanceof Array) { | ||
newMsg.payload = {}; | ||
// send message | ||
node.send(newMsg); | ||
} | ||
// else, response is single item | ||
@@ -250,0 +243,0 @@ else { |
1083528
18497