From ffa8af3dc9a526c87549e2603ce972ba0580ff47 Mon Sep 17 00:00:00 2001 From: bill Date: Fri, 16 Aug 2024 13:38:58 +0800 Subject: [PATCH] fix: Opening file whose type is Knowledge Graph appear error with tsx #1975 --- web/src/components/indented-tree/indented-tree.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/indented-tree/indented-tree.tsx b/web/src/components/indented-tree/indented-tree.tsx index 66299727dc8..547439459ef 100644 --- a/web/src/components/indented-tree/indented-tree.tsx +++ b/web/src/components/indented-tree/indented-tree.tsx @@ -369,9 +369,9 @@ const IndentedTree = ({ data, show }: IProps) => { graphRef.current = graph; - graph.setData(treeToGraphData(data)); + graph?.setData(treeToGraphData(data)); - graph.render(); + graph?.render(); }, []); useEffect(() => {