Browse Source

always filter the id list

tophf 6 years ago
parent
commit
27533230b1
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/popup/index.js

+ 2 - 3
src/popup/index.js

@@ -31,9 +31,8 @@ Object.assign(handlers, {
   async SetPopup(data, src) {
   async SetPopup(data, src) {
     if (store.currentTab.id !== src.tab.id) return;
     if (store.currentTab.id !== src.tab.id) return;
     const isTop = src.frameId === 0;
     const isTop = src.frameId === 0;
-    const ids = isTop
-      ? data.ids
-      : (await mutex.ready, data.ids.filter(id => !allScriptIds.includes(id)));
+    if (!isTop) await mutex.ready;
+    const ids = data.ids.filter(id => !allScriptIds.includes(id));
     allScriptIds.push(...ids);
     allScriptIds.push(...ids);
     if (isTop) {
     if (isTop) {
       mutex.resolve();
       mutex.resolve();