Skip to content

Commit 0a2e2f7

Browse files
authored
Handle both single and multiple antecedents in "antecedent" field (#155)
1 parent 36e5f2e commit 0a2e2f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/FlowNodeGraph.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function getDotForFlowGraph(api: CompilerApi, node: FlowNode, darkMode: boolean)
8181
parts.push(flagText);
8282
nodeLines.push(`${id} [shape=record ${nodeProps} label="{${parts.join("|")}}"];`);
8383
const antecedents = "antecedent" in fn && fn.antecedent != null
84-
? [fn.antecedent]
84+
? Array.isArray(fn.antecedent) ? fn.antecedent : [fn.antecedent]
8585
: ("antecedents" in fn && fn.antecedents)
8686
? fn.antecedents
8787
: [];

0 commit comments

Comments
 (0)