From be0f743970217c34d22cd0569b1f6458d09a8a12 Mon Sep 17 00:00:00 2001 From: dtoro Date: Mon, 16 Mar 2026 16:40:50 +0100 Subject: [PATCH] fix: defaults --- frontend/src/app/recollections/logos/LogosPage.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/recollections/logos/LogosPage.tsx b/frontend/src/app/recollections/logos/LogosPage.tsx index 663d1ea..f17a1b3 100644 --- a/frontend/src/app/recollections/logos/LogosPage.tsx +++ b/frontend/src/app/recollections/logos/LogosPage.tsx @@ -109,13 +109,13 @@ export function LogosPage() { [recollectionId] ) - const initialContent = useMemo( - () => - recollectionId && activePageId - ? getLogosContentForPage(recollectionId, activePageId) ?? undefined - : undefined, - [recollectionId, activePageId, reloadKey] - ) + const initialContent = useMemo(() => { + if (!recollectionId || !activePageId) return undefined + const content = getLogosContentForPage(recollectionId, activePageId) + // BlockNote requires a non-empty array of blocks; use undefined for default empty doc. + if (!content || !Array.isArray(content) || content.length === 0) return undefined + return content + }, [recollectionId, activePageId, reloadKey]) const editor = useCreateBlockNote( { schema: logosSchema, initialContent },