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

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);