summaryrefslogtreecommitdiff
path: root/ext/bg/js/deinflector.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-06-14 16:07:23 -0400
committerAlex Yatskov <alex@foosoft.net>2016-06-14 20:44:38 -0700
commitad617221308b04e8f26ec52d876603e7aec3a03d (patch)
tree005364d7c5485a1b470530b55f90f4e5ed8d6f4c /ext/bg/js/deinflector.js
parentcaf067883275f9b46259c2dbbf1f36aafc7e9108 (diff)
Use `let` instead of `const` in for loops.
Diffstat (limited to 'ext/bg/js/deinflector.js')
-rw-r--r--ext/bg/js/deinflector.js14
1 files changed, 7 insertions, 7 deletions
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);
}