mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-19 07:42:43 +00:00
perf: Optimize array traversal for empty memory-graph documents (#770)
This commit is contained in:
parent
d0d90e9359
commit
9f7f415dd5
3 changed files with 3 additions and 3 deletions
|
|
@ -446,7 +446,7 @@ export const MemoryGraph = ({
|
|||
/>
|
||||
|
||||
{!isLoading &&
|
||||
nodes.filter((n) => n.type === "document").length === 0 &&
|
||||
!nodes.some((n) => n.type === "document") &&
|
||||
children}
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ export const MemoryGraph = ({
|
|||
|
||||
{/* Show welcome screen when no memories exist */}
|
||||
{!isLoading &&
|
||||
(!data || nodes.filter((n) => n.type === "document").length === 0) && (
|
||||
(!data || !nodes.some((n) => n.type === "document")) && (
|
||||
<>{children}</>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ export const MemoryGraph = ({
|
|||
|
||||
{/* Show welcome screen when no memories exist */}
|
||||
{!isLoading &&
|
||||
(!data || nodes.filter((n) => n.type === "document").length === 0) && (
|
||||
(!data || !nodes.some((n) => n.type === "document")) && (
|
||||
<>{children}</>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue