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:
parent
28bfa8e418
commit
142a5f7ca1
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user