aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 20:04:28 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 21:44:32 -0400
commit87e513dd77ab228953449d534a989c8c68f39858 (patch)
treeec7bb5f61f7438980c0ff385eec45b6ec58bacac /ext/bg/js/backend.js
parent1f8c7358cb017e0c96a454d9e9a1f53eb6d4fe15 (diff)
Fix options reference being changed
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 1f00f788..4763e85d 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -34,7 +34,8 @@ class Backend {
async prepare() {
await this.translator.prepare();
- this.onOptionsUpdated(await optionsLoad());
+ this.options = await optionsLoad();
+ this.onOptionsUpdated();
if (chrome.commands !== null && typeof chrome.commands === 'object') {
chrome.commands.onCommand.addListener(this.onCommand.bind(this));
@@ -51,8 +52,7 @@ class Backend {
this.isPreparedPromise = null;
}
- onOptionsUpdated(options) {
- this.options = utilIsolate(options);
+ onOptionsUpdated() {
this.applyOptions();
const callback = () => this.checkLastError(chrome.runtime.lastError);