Skip to content

Commit

Permalink
fix(sync): Set disableBc: true in debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Jul 11, 2023
1 parent 91daa54 commit 21f6f39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/SyncServiceProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ export default function createSyncServiceProvider({ ydoc, syncService, fileId, i
throw new Error('fileId is required')
}
const WebSocketPolyfill = initWebSocketPolyfill(syncService, fileId, initialSession)
const disableBc = !!window?._oc_debug
const websocketProvider = new WebsocketProvider(
'ws://localhost:1234',
'file:' + fileId,
ydoc,
{ WebSocketPolyfill, disableBc: true },
{ WebSocketPolyfill, disableBc },
)
websocketProvider.on('status', event => logger.debug('status', event))
return websocketProvider
Expand Down

0 comments on commit 21f6f39

Please sign in to comment.