浏览代码

fix: actually do prefetch options

no need to unwrap response in Chrome after 2fe7d6ff
tophf 5 年之前
父节点
当前提交
d5957f654e
共有 1 个文件被更改,包括 1 次插入3 次删除
  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(() => {});
 }