1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Do not flag hasUsers=false nodes as unused in search

Fixes #3777
This commit is contained in:
Nick O'Leary 2022-07-20 10:47:57 +01:00
parent 1b94cc3ac0
commit 8d3c5d09f6
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -187,7 +187,7 @@ RED.search = (function() {
} }
if (flags.hasOwnProperty("unused")) { if (flags.hasOwnProperty("unused")) {
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) || var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
(isConfigNode && node.node.users.length === 0) (isConfigNode && node.node.users.length === 0 && node.node._def.hasUsers !== false)
if (flags.unused !== isUnused) { if (flags.unused !== isUnused) {
continue; continue;
} }