Browse Source

fix: can't add a workflow that has been shared to the extension

Ahmad Kholid 3 years ago
parent
commit
86c0540fe7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/models/workflow.js
  2. 1 1
      src/newtab/pages/workflows/[id].vue

+ 1 - 1
src/models/workflow.js

@@ -45,7 +45,7 @@ class Workflow extends Model {
   }
 
   static beforeCreate(model) {
-    if (model.dataColumns.length > 0) {
+    if (model.dataColumns?.length > 0) {
       model.table = model.dataColumns;
       model.dataColumns = [];
     }

+ 1 - 1
src/newtab/pages/workflows/[id].vue

@@ -569,7 +569,7 @@ function fetchLocalWorkflow() {
 }
 function insertToLocal() {
   const copy = {
-    ...props.workflow,
+    ...workflow.value,
     createdAt: Date.now(),
     version: chrome.runtime.getManifest().version,
   };