mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-12 23:01:07 +00:00
fix: add limitedDocuments dependency to activeVersionChain useMemo
Prevents stale version chain data when documents change but the selected node stays the same. The chainIndex ref is rebuilt in a useEffect when limitedDocuments changes, but without this dependency the useMemo would return cached (stale) chain data.
This commit is contained in:
parent
7e31f07924
commit
b08760ef85
1 changed files with 1 additions and 1 deletions
|
|
@ -497,7 +497,7 @@ export function MemoryGraph({
|
|||
const activeVersionChain = useMemo(() => {
|
||||
if (!activeNodeData || activeNodeData.type !== "memory") return null
|
||||
return chainIndex.current.getChain(activeNodeData.id)
|
||||
}, [activeNodeData])
|
||||
}, [activeNodeData, limitedDocuments])
|
||||
|
||||
const isLoading = externalIsLoading
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue