mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix RED.nodes.filterNodes when searching full node set
This commit is contained in:
parent
b427eca21f
commit
ab2d3bfd80
@ -448,12 +448,18 @@ RED.nodes = (function() {
|
||||
doZFilter = true;
|
||||
}
|
||||
}
|
||||
var objectLookup = false;
|
||||
if (searchSet === null) {
|
||||
searchSet = nodes;
|
||||
searchSet = Object.keys(nodes);
|
||||
objectLookup = true;
|
||||
}
|
||||
|
||||
|
||||
for (var n=0;n<searchSet.length;n++) {
|
||||
var node = searchSet[n];
|
||||
if (objectLookup) {
|
||||
node = nodes[node];
|
||||
}
|
||||
if (filter.hasOwnProperty("type") && node.type !== filter.type) {
|
||||
continue;
|
||||
}
|
||||
@ -1118,8 +1124,8 @@ RED.nodes = (function() {
|
||||
}
|
||||
}
|
||||
if ((!n._def.defaults || !n._def.defaults.hasOwnProperty("l")) && n.hasOwnProperty('l')) {
|
||||
var isLink = /^link (in|out)$/.test(node.type);
|
||||
if (isLink == n.l) {
|
||||
var showLabel = n._def.hasOwnProperty("showLabel")?n._def.showLabel:true;
|
||||
if (showLabel != n.l) {
|
||||
node.l = n.l;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user