Prechádzať zdrojové kódy

fix: error when opening some workflows

Ahmad Kholid 1 rok pred
rodič
commit
df7036b5c0
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/utils/helper.js

+ 1 - 1
src/utils/helper.js

@@ -67,7 +67,7 @@ export function findTriggerBlock(drawflow = {}) {
   if (!drawflow) return null;
 
   if (drawflow.drawflow) {
-    const blocks = Object.values(drawflow.drawflow?.Home?.data);
+    const blocks = Object.values(drawflow.drawflow?.Home?.data ?? {});
     if (!blocks) return null;
 
     return blocks.find(({ name }) => name === 'trigger');