From 142a5f7ca12dee5115e8632a429051746963ab95 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 8 Apr 2021 16:21:03 +0100 Subject: [PATCH] Fix change node form validation --- .../@node-red/nodes/core/function/15-change.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/function/15-change.html b/packages/node_modules/@node-red/nodes/core/function/15-change.html index ca8eefa91..13f6503ae 100644 --- a/packages/node_modules/@node-red/nodes/core/function/15-change.html +++ b/packages/node_modules/@node-red/nodes/core/function/15-change.html @@ -24,11 +24,12 @@ if (!RED.utils.validatePropertyExpression(v)) { return false; } - } else if (v[i].vt === "jsonata") { + } else if (vt === "jsonata") { try{jsonata(v);}catch(e){return false;} - } else if ([i].vt === "json") { + } else if (vt === "json") { try{JSON.parse(v);}catch(e){return false;} } + return true; } RED.nodes.registerType('change', { color: "#E2D96E",