Skip to content

Commit bfcb9b0

Browse files
authored
fix: issue FlowNode graph of switch-case broken on TS 5.5.x #158 (#159)
1 parent e4083d0 commit bfcb9b0

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
@@ -66,7 +66,7 @@ function getDotForFlowGraph(api: CompilerApi, node: FlowNode, darkMode: boolean)
6666
const id = idForNode(fn);
6767

6868
let nodeText = null;
69-
if ("node" in fn && fn.node) {
69+
if ("node" in fn && fn.node && typeof fn.node?.getText === "function") {
7070
nodeText = fn.node.getText();
7171
if (nodeText.length > 50) {
7272
nodeText = nodeText.slice(0, 45) + "…";

0 commit comments

Comments
 (0)