Browse Source

fix: populate `ids` for failed envDelayed scripts

tophf 4 years ago
parent
commit
1c9a48a72c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/injected/content/inject.js

+ 3 - 1
src/injected/content/inject.js

@@ -198,13 +198,15 @@ async function injectDelayedScripts(contentId, webId, { cache, scripts }) {
   let needsInvoker;
   scripts::forEach(script => {
     const { code, runAt } = script;
+    const { id } = script.props;
     if (!code) {
       needsInvoker = true;
       contLists[runAt]::push(script);
     } else if (pageInjectable) {
       pgLists[runAt]::push(script);
     } else {
-      bridge.failedIds::push(script.props.id);
+      bridge.failedIds::push(id);
+      bridge.ids::push(id);
     }
   });
   if (document::getReadyState() === 'loading') {