diff options
| author | Alex Yatskov <alex@foosoft.net> | 2019-09-02 11:47:14 -0700 | 
|---|---|---|
| committer | Alex Yatskov <alex@foosoft.net> | 2019-09-02 11:47:14 -0700 | 
| commit | 5347da528bd07166b4686f45440d80a77f4888a3 (patch) | |
| tree | 08bbfd0c859327ee9a08ca86afd222a222ced62b /ext/bg/js/backend.js | |
| parent | da981c0b911dc5a697246006089b266fddba84a7 (diff) | |
| parent | 4ac55da7dd5354e6c3495f04583352d0d863b7b6 (diff) | |
Merge branch 'master' into testing
Diffstat (limited to 'ext/bg/js/backend.js')
| -rw-r--r-- | ext/bg/js/backend.js | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index d49286d0..d95cb82d 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -57,9 +57,10 @@ class Backend {              this.anki = new AnkiNull();          } +        const callback = () => this.checkLastError(chrome.runtime.lastError);          chrome.tabs.query({}, tabs => {              for (const tab of tabs) { -                chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, () => null); +                chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, callback);              }          });      } @@ -147,6 +148,10 @@ class Backend {              chrome.browserAction.setBadgeText({text});          }      } + +    checkLastError(e) { +        // NOP +    }  }  window.yomichan_backend = new Backend(); |