]> git.r.bdr.sh - rbdr/junction/blobdiff - extension/junction.js
Make tada accessible on web
[rbdr/junction] / extension / junction.js
index 16bc9f379c318f619e930fd57fb5454c5290df52..a662f6c8f612150cca9843e57262e613e9ea7075 100644 (file)
@@ -56,14 +56,16 @@ const internals = {
 
     internals.getRoot().browserAction.disable();
     const activeTabs = await internals.getActiveTabs();
 
     internals.getRoot().browserAction.disable();
     const activeTabs = await internals.getActiveTabs();
-    const execution = await internals.getRoot().tabs.executeScript(activeTabs[0].id, {
-      file: '/content_script.js'
-    });
 
 
-    if (!execution[0]) {
-      internals.onDisconnect();
-    }
-  },
+      const execution = await internals.getRoot().tabs.executeScript(activeTabs[0].id, {
+        file: '/content_script.js'
+      });
+
+      if (!execution || !execution[0]) {
+        internals.onDisconnect();
+      }
+  }
+  ,
 
   hangUp() {
 
 
   hangUp() {