From bfcb9b0fb95106d128e35dede1e3a6db1835ff82 Mon Sep 17 00:00:00 2001 From: Andrea Simone Costa Date: Mon, 30 Sep 2024 14:16:24 +0200 Subject: [PATCH] fix: issue FlowNode graph of switch-case broken on TS 5.5.x #158 (#159) --- src/components/FlowNodeGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FlowNodeGraph.tsx b/src/components/FlowNodeGraph.tsx index ec90c0819..6a79bab75 100644 --- a/src/components/FlowNodeGraph.tsx +++ b/src/components/FlowNodeGraph.tsx @@ -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) + "…";