Need to guard against subflows that doesn't have a set property

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
Gauthier Dandele 2024-11-08 12:28:40 +01:00 committed by GitHub
parent abe0b60bf7
commit 59a133cc13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,7 +382,7 @@ RED.typeSearch = (function() {
var items = [];
RED.nodes.registry.getNodeTypes().forEach(function(t) {
var def = RED.nodes.getType(t);
if (def.set.enabled && def.category !== 'config' && t !== 'unknown' && t !== 'tab') {
if (def.set?.enabled !== false && def.category !== 'config' && t !== 'unknown' && t !== 'tab') {
items.push({type:t,def: def, label:getTypeLabel(t,def)});
}
});