diff --git a/lightrag_webui/src/components/graph/GraphLabels.tsx b/lightrag_webui/src/components/graph/GraphLabels.tsx index fb91bfb9..f43bd955 100644 --- a/lightrag_webui/src/components/graph/GraphLabels.tsx +++ b/lightrag_webui/src/components/graph/GraphLabels.tsx @@ -63,9 +63,9 @@ const GraphLabels = () => { // 2. Current label is not the default '*' // 3. Current label doesn't exist in allDatabaseLabels if ( - allDatabaseLabels.length > 1 && - label && - label !== '*' && + allDatabaseLabels.length > 1 && + label && + label !== '*' && !allDatabaseLabels.includes(label) ) { console.log(`Label "${label}" not found in available labels, resetting to default`);