Explorar el Código

fix: error when opening some workflows

Ahmad Kholid hace 1 año
padre
commit
df7036b5c0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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');