From f6fa1454ed1b050fe4fd0dfd062b22a911f404be Mon Sep 17 00:00:00 2001 From: Andrea Simone Costa Date: Wed, 4 Sep 2024 10:09:59 +0200 Subject: [PATCH] fix: issue FlowNode graph of switch-case broken on TS 5.5.x #158 --- 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) + "…";