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/vc.js b/dev/js/src/vc.js
index 6cd3c00..764ed96 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -233,10 +233,10 @@
// Check recursively
else if (obj.ldType() === 'docGroup') {
- for (var i in obj.operands()) {
- if (this.wasRewritten(obj.getOperand(i))) {
- return true;
- }
+
+ // If there was a rewritten object
+ if (obj.operands().find(op => this.wasRewritten(op)) !== undefined) {
+ return true;
};
};