Merge pull request #4715 from GogoVega/fix-validateNodeEditorProperty

Fix a checkbox should return a Boolean value and not the string `on`
This commit is contained in:
Nick O'Leary
2024-05-23 13:43:55 +01:00
committed by GitHub

View File

@@ -248,6 +248,8 @@ RED.editor = (function() {
var value = input.val();
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
value = input.text();
} else if (input.attr("type") === "checkbox") {
value = input.prop("checked");
}
var valid = validateNodeProperty(node, defaults, property,value);
if (((typeof valid) === "string") || !valid) {