From 8efe5b1fbf6bf1539c93f25b6b87918c1a651f00 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 28 Jan 2017 18:46:15 -0800 Subject: workaround for broken const in firefox --- ext/bg/js/options.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/bg/js/options.js') diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index ca2792c0..25e0945c 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -48,7 +48,7 @@ function optionsSetDefaults(options) { }; const combine = (target, source) => { - for (const key in source) { + for (let key in source) { if (!(key in target)) { target[key] = source[key]; } @@ -104,8 +104,8 @@ function optionsVersion(options) { '{glossary-list}': '{glossary}' }; - for (const name in fields) { - for (const fixup in fixups) { + for (let name in fields) { + for (let fixup in fixups) { fields[name] = fields[name].replace(fixup, fixups[fixup]); } } @@ -114,7 +114,7 @@ function optionsVersion(options) { fixupFields(options.anki.terms.fields); fixupFields(options.anki.kanji.fields); - for (const title in options.dictionaries) { + for (let title in options.dictionaries) { const dictionary = options.dictionaries[title]; dictionary.enabled = dictionary.enableTerms || dictionary.enableKanji; dictionary.priority = 0; @@ -127,8 +127,8 @@ function optionsVersion(options) { '{glossary-list}': '{glossary}' }; - for (const name in fields) { - for (const fixup in fixups) { + for (let name in fields) { + for (let fixup in fixups) { fields[name] = fields[name].replace(fixup, fixups[fixup]); } } -- cgit v1.2.3