Merge pull request #4643 from node-red/fix-subflow-mod-config-select

Fix handling of subflow config-node select type in sf module
This commit is contained in:
Nick O'Leary 2024-04-03 13:54:41 +01:00 committed by GitHub
commit 884b7fa16a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1280,14 +1280,20 @@ RED.subflow = (function() {
var nodePropValue = nodeProp;
if (prop.ui && prop.ui.type === "cred") {
nodePropType = "cred";
} else if (prop.ui && prop.ui.type === "conf-types") {
nodePropType = prop.value.type
} else {
switch(typeof nodeProp) {
case "string": nodePropType = "str"; break;
case "number": nodePropType = "num"; break;
case "boolean": nodePropType = "bool"; nodePropValue = nodeProp?"true":"false"; break;
default:
nodePropType = nodeProp.type;
nodePropValue = nodeProp.value;
if (nodeProp) {
nodePropType = nodeProp.type;
nodePropValue = nodeProp.value;
} else {
nodePropType = 'str'
}
}
}
var item = {