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
commit da97c5d558
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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) {