Explorar o código

fix: actually do prefetch options

no need to unwrap response in Chrome after 2fe7d6ff
tophf %!s(int64=5) %!d(string=hai) anos
pai
achega
d5957f654e
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/common/browser.js

+ 1 - 3
src/common/browser.js

@@ -148,7 +148,5 @@ if (!global.browser?.runtime?.sendMessage) {
 // prefetch the options while the current extension page loads
 /* global browser */
 if (browser.tabs) {
-  global.allOptions = browser.runtime.sendMessage({ cmd: 'GetAllOptions' })
-  .then(res => (global.chrome.app ? res.data : res)) // in Chrome we wrap `data` and `error`
-  .catch(() => {});
+  global.allOptions = browser.runtime.sendMessage({ cmd: 'GetAllOptions' }).catch(() => {});
 }