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

change check order for node.users

If node _def hasUsers is false then node.users may not exist... so won't have a length...
This commit is contained in:
Dave Conway-Jones 2018-12-08 18:09:33 +00:00
parent acf8c9bc4a
commit cf3b4e9e63
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -340,7 +340,7 @@ RED.deploy = (function() {
var unusedConfigNodes = [];
RED.nodes.eachConfig(function(node) {
if (node.users.length === 0 && (node._def.hasUsers !== false)) {
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}