Skip to content

Commit

Permalink
fix: fix the crash in graph/timeline view for corner case (#362)
Browse files Browse the repository at this point in the history
Signed-off-by: Nastya Rusina <[email protected]>
  • Loading branch information
anrusina authored Apr 8, 2022
1 parent e7e3f7e commit ab7340e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/WorkflowGraph/transformerWorkflowToDag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ export const transformerWorkflowToDag = (
* @param context The current workflow being parsed
*/
const parseWorkflow = (root, context: CompiledWorkflow) => {
if (!context?.template?.nodes) {
return root;
}

/* Build Nodes from template */
for (let i = 0; i < context.template.nodes.length; i++) {
const compiledNode: CompiledNode = context.template.nodes[i];
Expand Down

0 comments on commit ab7340e

Please sign in to comment.