mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #3715 from node-red/fix-hide-flows-count
Ensure 'hidden flow' count doesn't include subflows
This commit is contained in:
		| @@ -284,9 +284,22 @@ RED.workspaces = (function() { | ||||
|                         onselect: "core:show-last-hidden-flow" | ||||
|                     } | ||||
|                 ] | ||||
|                 if (hideStack.length > 0) { | ||||
|                 let hiddenFlows = new Set() | ||||
|                 for (let i = 0; i < hideStack.length; i++) { | ||||
|                     let ids = hideStack[i] | ||||
|                     if (!Array.isArray(ids)) { | ||||
|                         ids = [ids] | ||||
|                     } | ||||
|                     ids.forEach(id => { | ||||
|                         if (RED.nodes.workspace(id)) { | ||||
|                             hiddenFlows.add(id) | ||||
|                         } | ||||
|                     }) | ||||
|                 } | ||||
|                 const flowCount = hiddenFlows.size; | ||||
|                 if (flowCount > 0) { | ||||
|                     menuItems.unshift({ | ||||
|                         label: RED._("workspace.hiddenFlows",{count: hideStack.length}), | ||||
|                         label: RED._("workspace.hiddenFlows",{count: flowCount}), | ||||
|                         onselect: "core:list-hidden-flows" | ||||
|                     }) | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user