Parcourir la source

fix: workflow is empty when it gets shared

Ahmad Kholid il y a 3 ans
Parent
commit
e2fc747d4a
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      src/content/services/webService.js

+ 5 - 0
src/content/services/webService.js

@@ -64,6 +64,11 @@ function initWebListener() {
           table: workflow.table || workflow.dataColumns,
         };
 
+        workflowData.drawflow =
+          typeof workflowData.drawflow === 'string'
+            ? parseJSON(workflowData.drawflow, workflowData.drawflow)
+            : workflowData.drawflow;
+
         if (Array.isArray(workflowsStorage)) {
           workflowsStorage.push(workflowData);
         } else {