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

Fix change node form validation

This commit is contained in:
Nick O'Leary 2021-04-08 16:21:03 +01:00
parent 28bfa8e418
commit 142a5f7ca1
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -24,11 +24,12 @@
if (!RED.utils.validatePropertyExpression(v)) { if (!RED.utils.validatePropertyExpression(v)) {
return false; return false;
} }
} else if (v[i].vt === "jsonata") { } else if (vt === "jsonata") {
try{jsonata(v);}catch(e){return false;} try{jsonata(v);}catch(e){return false;}
} else if ([i].vt === "json") { } else if (vt === "json") {
try{JSON.parse(v);}catch(e){return false;} try{JSON.parse(v);}catch(e){return false;}
} }
return true;
} }
RED.nodes.registerType('change', { RED.nodes.registerType('change', {
color: "#E2D96E", color: "#E2D96E",