Skip to content

Commit 74e94e7

Browse files
authored
Merge pull request #420 from Harbour-Enterprises/nick/no-global-sync-if-no-superdocid
Prevent trying to connect the global superdoc ydoc connection if there is no superdocId
2 parents 5d20761 + bc5a719 commit 74e94e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/superdoc/src/core/collaboration

packages/superdoc/src/core/collaboration/helpers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ export const initCollaborationComments = (superdoc) => {
5555
export const initSuperdocYdoc = (superdoc) => {
5656
const { isInternal } = superdoc.config;
5757
const baseName = `${superdoc.config.superdocId}-superdoc`;
58-
const documentId = isInternal ? baseName : `${baseName}-external`;
58+
if (!superdoc.config.superdocId) return;
5959

60+
const documentId = isInternal ? baseName : `${baseName}-external`;
6061
const superdocCollaborationOptions = {
6162
config: superdoc.config.modules.collaboration,
6263
user: superdoc.config.user,

0 commit comments

Comments
 (0)