Guard refresh of unknown subflow

This commit is contained in:
Nick O'Leary 2024-04-02 15:54:34 +01:00
parent ade4679e8c
commit 5dfa47ab6c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -158,8 +158,10 @@ RED.sidebar.help = (function() {
function refreshSubflow(sf) { function refreshSubflow(sf) {
var item = treeList.treeList('get',"node-type:subflow:"+sf.id); var item = treeList.treeList('get',"node-type:subflow:"+sf.id);
item.subflowLabel = sf._def.label().toLowerCase(); if (item) {
item.treeList.replaceElement(getNodeLabel({_def:sf._def,type:sf._def.label()})); item.subflowLabel = sf._def.label().toLowerCase();
item.treeList.replaceElement(getNodeLabel({_def:sf._def,type:sf._def.label()}));
}
} }
function hideTOC() { function hideTOC() {