From 15f9406e7b4a9185dbe83442b38cbd64711ab70e Mon Sep 17 00:00:00 2001 From: balibabu Date: Thu, 23 Jan 2025 11:32:49 +0800 Subject: [PATCH] Fix: Capture the problem that the knowledge graph interface returns null and causes page errors #4543 (#4598) ### What problem does this PR solve? Fix: Capture the problem that the knowledge graph interface returns null and causes page errors #4543 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .../pages/add-knowledge/components/knowledge-sidebar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/pages/add-knowledge/components/knowledge-sidebar/index.tsx b/web/src/pages/add-knowledge/components/knowledge-sidebar/index.tsx index 7099cdc88..83bc3c9f0 100644 --- a/web/src/pages/add-knowledge/components/knowledge-sidebar/index.tsx +++ b/web/src/pages/add-knowledge/components/knowledge-sidebar/index.tsx @@ -79,7 +79,7 @@ const KnowledgeSidebar = () => { ), ]; - if (!isEmpty(data.graph)) { + if (!isEmpty(data?.graph)) { list.push( getItem( KnowledgeRouteKey.KnowledgeGraph,