mirror of
https://github.com/node-red/node-red
synced 2024-11-22 07:58:04 +00:00
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:
commit
da97c5d558
@ -248,6 +248,8 @@ RED.editor = (function() {
|
|||||||
var value = input.val();
|
var value = input.val();
|
||||||
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
|
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
|
||||||
value = input.text();
|
value = input.text();
|
||||||
|
} else if (input.attr("type") === "checkbox") {
|
||||||
|
value = input.prop("checked");
|
||||||
}
|
}
|
||||||
var valid = validateNodeProperty(node, defaults, property,value);
|
var valid = validateNodeProperty(node, defaults, property,value);
|
||||||
if (((typeof valid) === "string") || !valid) {
|
if (((typeof valid) === "string") || !valid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user