From bc5a719eee0884ffaa69aed2e3ddf871aefc8461 Mon Sep 17 00:00:00 2001 From: Nick Bernal Date: Mon, 24 Mar 2025 21:30:56 -0700 Subject: [PATCH] Prevent trying to connect the global superdoc ydoc connection if there is no superdoc id --- packages/superdoc/src/core/collaboration/helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/superdoc/src/core/collaboration/helpers.js b/packages/superdoc/src/core/collaboration/helpers.js index a711f704e0..f8f100c6ac 100644 --- a/packages/superdoc/src/core/collaboration/helpers.js +++ b/packages/superdoc/src/core/collaboration/helpers.js @@ -55,8 +55,9 @@ export const initCollaborationComments = (superdoc) => { export const initSuperdocYdoc = (superdoc) => { const { isInternal } = superdoc.config; const baseName = `${superdoc.config.superdocId}-superdoc`; - const documentId = isInternal ? baseName : `${baseName}-external`; + if (!superdoc.config.superdocId) return; + const documentId = isInternal ? baseName : `${baseName}-external`; const superdocCollaborationOptions = { config: superdoc.config.modules.collaboration, user: superdoc.config.user,