mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4788 from GogoVega/fix-config-node-select
Fix the config node select value assignment
This commit is contained in:
commit
3230654ecd
@ -426,14 +426,13 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var label = "";
|
const optionCount = select.find("option").length
|
||||||
var configNode = RED.nodes.node(nodeValue);
|
if (optionCount === 1) {
|
||||||
|
// We only have the 'add new...' option
|
||||||
if (configNode) {
|
select.val('_ADD_')
|
||||||
label = RED.utils.getNodeLabel(configNode, configNode.id);
|
} else {
|
||||||
|
select.val(nodeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.val(label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user