ensure JSON node handles single booleans and numbers

This commit is contained in:
Dave Conway-Jones
2019-02-15 17:07:11 +00:00
parent afd2ccfb4f
commit 28d4084aa0
2 changed files with 61 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ module.exports = function(RED) {
}
}
}
else if (typeof value === "object") {
else if ((typeof value === "object") || (typeof value === "boolean") || (typeof value === "number")) {
if (node.action === "" || node.action === "str") {
if (!Buffer.isBuffer(value)) {
try {