Modernize ES for-loops and remove problematic for-in loops
This slightly modifies the behaviour of errors (see init.js)
Change-Id: I1aab691d5b7e8167b6213378bdd9139c133202cd
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index 92062cc..7ce2652 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -85,10 +85,9 @@
else {
// Iterate over allowed match terms
- for (var i in _matchTerms) {
- var term = _matchTerms[i];
+ _matchTerms.forEach(function(term) {
this[term] = match[term] !== undefined ? match[term] : undefined;
- };
+ }, this);
};
this._avail = {