aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-10-01 09:33:49 +0000
committerGitHub <noreply@github.com>2023-10-01 09:33:49 +0000
commitfeeeb83e3474bb6c8a8d7889807edf28bfd8c9b6 (patch)
treee104f873d45cace033d4d8c795bb6db0b49050d9
parent8430fce21912ad08ddeaa3714c6feb0c2cc01c10 (diff)
parenta0c35c50cdea45c9b3eb49795fe1b0268d48e8f7 (diff)
Merge pull request #265 from praschke/optionsUpdated-background-init
fix: page and popup state is destroyed on background wakeup
-rw-r--r--ext/js/yomichan.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/js/yomichan.js b/ext/js/yomichan.js
index 5a55b3ea..a4feaa23 100644
--- a/ext/js/yomichan.js
+++ b/ext/js/yomichan.js
@@ -214,7 +214,9 @@ class Yomichan extends EventDispatcher {
}
_onMessageOptionsUpdated({source}) {
- this.trigger('optionsUpdated', {source});
+ if (source !== 'background') {
+ this.trigger('optionsUpdated', {source});
+ }
}
_onMessageDatabaseUpdated({type, cause}) {