From ad617221308b04e8f26ec52d876603e7aec3a03d Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 14 Jun 2016 16:07:23 -0400 Subject: Use `let` instead of `const` in for loops. --- ext/bg/js/deinflector.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/bg/js/deinflector.js') diff --git a/ext/bg/js/deinflector.js b/ext/bg/js/deinflector.js index ec43f037..a0a72872 100644 --- a/ext/bg/js/deinflector.js +++ b/ext/bg/js/deinflector.js @@ -26,12 +26,12 @@ class Deinflection { } validate(validator) { - for (const tags of validator(this.term)) { + for (let tags of validator(this.term)) { if (this.tags.length === 0) { return true; } - for (const tag of this.tags) { + for (let tag of this.tags) { if (tags.indexOf(tag) !== -1) { return true; } @@ -47,11 +47,11 @@ class Deinflection { this.children.push(child); } - for (const rule in rules) { + for (let rule in rules) { const variants = rules[rule]; - for (const v of variants) { + for (let v of variants) { let allowed = this.tags.length === 0; - for (const tag of this.tags) { + for (let tag of this.tags) { // // TODO: Handle addons through tags.json or rules.json // @@ -83,8 +83,8 @@ class Deinflection { } const paths = []; - for (const child of this.children) { - for (const path of child.gather()) { + for (let child of this.children) { + for (let path of child.gather()) { if (this.rule.length > 0) { path.rules.push(this.rule); } -- cgit v1.2.3