From 09f2be4d63d9a6f4c7c4e0527552b2d7d7253fed Mon Sep 17 00:00:00 2001 From: Palanikannan M Date: Mon, 16 Dec 2024 20:02:59 +0530 Subject: [PATCH] fix: indexeddb sync loader added --- .../editors/document/collaborative-editor.tsx | 11 +++++++---- .../components/editors/document/page-renderer.tsx | 1 - web/core/components/pages/editor/editor-body.tsx | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/editor/src/core/components/editors/document/collaborative-editor.tsx b/packages/editor/src/core/components/editors/document/collaborative-editor.tsx index 5a7ff1840a2..5accb9133dc 100644 --- a/packages/editor/src/core/components/editors/document/collaborative-editor.tsx +++ b/packages/editor/src/core/components/editors/document/collaborative-editor.tsx @@ -88,10 +88,13 @@ const CollaborativeDocumentEditor = (props: ICollaborativeDocumentEditor) => { if (!editor) return null; - // Wait until we know about IndexedDB status - if (hasIndexedDbEntry === null) return null; - - if (hasServerConnectionFailed || (!hasIndexedDbEntry && !hasServerSynced) || !hasIndexedDbSynced) { + if ( + hasServerConnectionFailed || + (!hasIndexedDbEntry && !hasServerSynced) || + !hasIndexedDbSynced || + !hasIndexedDbEntry + ) { + console.log("syncing indexedDB"); return ; } diff --git a/packages/editor/src/core/components/editors/document/page-renderer.tsx b/packages/editor/src/core/components/editors/document/page-renderer.tsx index 7e190a640ee..15fe8e7bbc6 100644 --- a/packages/editor/src/core/components/editors/document/page-renderer.tsx +++ b/packages/editor/src/core/components/editors/document/page-renderer.tsx @@ -129,7 +129,6 @@ export const PageRenderer = (props: IPageRenderer) => { [editor, cleanup] ); - console.log("rendered"); return ( <>
diff --git a/web/core/components/pages/editor/editor-body.tsx b/web/core/components/pages/editor/editor-body.tsx index 8cf794d9b4a..41066a57c30 100644 --- a/web/core/components/pages/editor/editor-body.tsx +++ b/web/core/components/pages/editor/editor-body.tsx @@ -221,7 +221,6 @@ export const PageEditorBody: React.FC = observer((props) => { menu: getAIMenu, }} /> - )