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

Fix not shown error (#692)

Fixed response to shown as string and not object
This commit is contained in:
Frakke0 2020-09-27 13:57:09 +02:00 committed by GitHub
parent d3a3bc158c
commit e980c8c04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,8 +103,8 @@ module.exports = function(RED) {
if (err) { node.error(err,msg); }
else {
try {
response = JSON.parse(response);
if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); }
var responseObject = JSON.parse(response);
if (responseObject.status !== 1) { node.error("[57-pushover.js] Error: "+response); }
}
catch(e) {
node.error("[57-pushover.js] Error: "+response);