Merge pull request #4788 from GogoVega/fix-config-node-select

Fix the config node select value assignment
This commit is contained in:
Nick O'Leary 2024-06-24 16:59:16 +01:00 committed by GitHub
commit 3230654ecd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -426,14 +426,13 @@ RED.editor = (function() {
}
});
var label = "";
var configNode = RED.nodes.node(nodeValue);
if (configNode) {
label = RED.utils.getNodeLabel(configNode, configNode.id);
const optionCount = select.find("option").length
if (optionCount === 1) {
// We only have the 'add new...' option
select.val('_ADD_')
} else {
select.val(nodeValue);
}
input.val(label);
}
/**