diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index 786c2b7d..ca47c7b7 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -337,7 +337,7 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) => const source = nodeIdMap[edge.source] const target = nodeIdMap[edge.target] - if (source !== undefined && source !== undefined) { + if (source !== undefined && target !== undefined) { const sourceNode = rawData.nodes[source] const targetNode = rawData.nodes[target] if (!sourceNode) {