Modernize for;;-loops
Change-Id: Ic6f86af0d674cc6643fc9eef2aa7431cfdf514f2
diff --git a/dev/js/src/match/treearc.js b/dev/js/src/match/treearc.js
index 2acda9b..e7d7ac3 100644
--- a/dev/js/src/match/treearc.js
+++ b/dev/js/src/match/treearc.js
@@ -99,7 +99,7 @@
_parse : function (parent, children, mark) {
// Iterate over all child nodes
- children.forEach(function(c) {
+ Array.from(children).forEach(function(c) {
// Element node
if (c.nodeType == 1) {
@@ -723,8 +723,7 @@
var stack = [];
// Iterate over all definitions
- for (var i = 0; i < list.length; i++) {
- var current = list[i];
+ list.forEach(function(current) {
// Check the stack order
var overlaps = 0;
@@ -766,7 +765,7 @@
stack.sort(function (a,b) {
b.overlaps - a.overlaps
});
- };
+ });
return stack;
};