We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cb296f1 + bc3e64f commit 69f4d32Copy full SHA for 69f4d32
html/js/map-directive.js
@@ -1106,9 +1106,13 @@ angular.module("mapApp")
1106
// Next add any hosts in the list as children
1107
// of the node, if they're not already
1108
hosts.forEach(function(e) {
1109
- var childIndex = node.children.findIndex(function(s) {
1110
- return s.hostInfo.name === e;
1111
- });
+ var childIndex = -1;
+ for (let i = 0; i < node.children.length; i++) {
+ if (node.children[i].hostInfo.name === e) {
1112
+ childIndex = i;
1113
+ break;
1114
+ }
1115
1116
1117
if ($scope.hostList[e]) {
1118
0 commit comments