Skip to content

Commit

Permalink
fix: issue FlowNode graph of switch-case broken on TS 5.5.x dsherret#158
Browse files Browse the repository at this point in the history
  • Loading branch information
jfet97 committed Sep 4, 2024
1 parent 57d7326 commit f6fa145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FlowNodeGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getDotForFlowGraph(api: CompilerApi, node: FlowNode, darkMode: boolean)
const id = idForNode(fn);

let nodeText = null;
if ("node" in fn && fn.node) {
if ("node" in fn && fn.node && typeof fn.node?.getText === "function") {
nodeText = fn.node.getText();
if (nodeText.length > 50) {
nodeText = nodeText.slice(0, 45) + "…";
Expand Down

0 comments on commit f6fa145

Please sign in to comment.