Ahmad Kholid 2 years ago
parent
commit
2327acfb9e
3 changed files with 5 additions and 2 deletions
  1. 1 1
      package.json
  2. 2 1
      src/content/showExecutedBlock.js
  3. 2 0
      src/utils/workflowTrigger.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "automa",
-  "version": "1.14.2",
+  "version": "1.14.5",
   "description": "An extension for automating your browser by connecting blocks",
   "license": "MIT",
   "repository": {

+ 2 - 1
src/content/showExecutedBlock.js

@@ -35,7 +35,8 @@ export default function (data, enable) {
     return () => {};
   }
 
-  const block = tasks[data.name];
+  const block = tasks[data.label];
+  if (!block) return () => {};
   let container = document.querySelector('.automa-executed-block');
 
   if (!container) {

+ 2 - 0
src/utils/workflowTrigger.js

@@ -13,6 +13,8 @@ export function registerContextMenu(workflowId, data) {
     const isFirefox = BROWSER_TYPE === 'firefox';
     const browserContext = isFirefox ? browser.menus : browser.contextMenus;
 
+    if (!browserContext) return;
+
     browserContext.create(
       {
         id: workflowId,