mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix the selected value if no config nodes available
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
parent
9c511b6674
commit
a5b53ee373
@ -426,8 +426,13 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the select value
|
const optionCount = select.find("option").length
|
||||||
select.val(nodeValue);
|
if (optionCount === 1) {
|
||||||
|
// We only have the 'add new...' option
|
||||||
|
select.val('_ADD_')
|
||||||
|
} else {
|
||||||
|
select.val(nodeValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user