diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index 4d4eab84b..f0f3a073b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -128,7 +128,7 @@ RED.editor = (function() { * @param definition - the node property definitions (either def.defaults or def.creds) * @param property - the property name being validated * @param value - the property value being validated - * @returns {boolean} whether the node proprty is valid + * @returns {boolean|string} whether the node proprty is valid. `true`: valid `false|String`: invalid */ function validateNodeProperty(node,definition,property,value) { var valid = true; @@ -165,6 +165,10 @@ RED.editor = (function() { if ((definition[property].validate.length === 2) && ((typeof valid) === "string")) { return valid; + } else { + // Otherwise, a 2.x returns a truth-like/false-like value that + // we should cooerce to a boolean. + valid = !!valid } } catch(err) { console.log("Validation error:",node.type,node.id,"property: "+property,"value:",value,err); diff --git a/packages/node_modules/@node-red/nodes/core/common/20-inject.html b/packages/node_modules/@node-red/nodes/core/common/20-inject.html index 9f4ee07e0..4811d3ae5 100644 --- a/packages/node_modules/@node-red/nodes/core/common/20-inject.html +++ b/packages/node_modules/@node-red/nodes/core/common/20-inject.html @@ -230,17 +230,21 @@ for (var i=0;i