Skip to content

Commit 1368b08

Browse files
authored
Merge pull request #27 from fabik111/fix_RED_obj
Fix crash when an object was injected
2 parents 5059321 + 8769632 commit 1368b08

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arduino-iot-cloud.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,14 @@ module.exports = function (RED) {
447447
RED.httpAdmin.get("/properties", RED.auth.needsPermission('Property-in.read'), async function (req, res) {
448448
return getThingsOrProperties(req, res, "properties");
449449
});
450-
}
451450

452-
function getStatus(value) {
453-
if (typeof value !== "object") {
454-
if (typeof value === "number" && !(Number.isInteger(value)))
455-
return value.toFixed(3);
456-
else
457-
return value;
451+
function getStatus(value) {
452+
if (typeof value !== "object") {
453+
if (typeof value === "number" && !(Number.isInteger(value)))
454+
return value.toFixed(3);
455+
else
456+
return value;
457+
}
458+
return RED._("arduino-iot-cloud.status.object-injected");
458459
}
459-
return RED._("arduino-iot-cloud.status.object-injected");
460-
}
460+
}

0 commit comments

Comments
 (0)