mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add fallback for Object.values call in IE11
This commit is contained in:
parent
9775d3a33d
commit
e5738d608c
@ -1296,8 +1296,13 @@ RED.nodes = (function() {
|
|||||||
function filterNodes(filter) {
|
function filterNodes(filter) {
|
||||||
var result = [];
|
var result = [];
|
||||||
var searchSet = nodes;
|
var searchSet = nodes;
|
||||||
if (filter.hasOwnProperty("z") && Object.hasOwnProperty("values") && nodeTabMap.hasOwnProperty(filter.z) ) {
|
var doZFilter = false;
|
||||||
searchSet = Object.values(nodeTabMap[filter.z]);
|
if (filter.hasOwnProperty("z")) {
|
||||||
|
if (Object.hasOwnProperty("values") && nodeTabMap.hasOwnProperty(filter.z) ) {
|
||||||
|
searchSet = Object.values(nodeTabMap[filter.z]);
|
||||||
|
} else {
|
||||||
|
doZFilter = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var n=0;n<searchSet.length;n++) {
|
for (var n=0;n<searchSet.length;n++) {
|
||||||
@ -1305,6 +1310,9 @@ RED.nodes = (function() {
|
|||||||
if (filter.hasOwnProperty("type") && node.type !== filter.type) {
|
if (filter.hasOwnProperty("type") && node.type !== filter.type) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (doZFilter && node.z !== filter.z) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
result.push(node);
|
result.push(node);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user