Browse Source

fix: error by the "new tab" block

Ahmad Kholid 3 years ago
parent
commit
722e7c2491
2 changed files with 4 additions and 2 deletions
  1. 1 1
      package.json
  2. 3 1
      src/components/newtab/workflow/WorkflowBuilder.vue

+ 1 - 1
package.json

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

+ 3 - 1
src/components/newtab/workflow/WorkflowBuilder.vue

@@ -115,7 +115,9 @@ export default {
 
       if (props.data) {
         const data =
-          typeof props.data === 'string' ? JSON.parse(props.data) : props.data;
+          typeof props.data === 'string'
+            ? JSON.parse(props.data.replace(/BlockNewTab/g, 'BlockBasic'))
+            : props.data;
 
         editor.value.import(data);
       } else {