diff --git a/src/services/SyncServiceProvider.js b/src/services/SyncServiceProvider.js index 757823640c9..cb4b6f1648c 100644 --- a/src/services/SyncServiceProvider.js +++ b/src/services/SyncServiceProvider.js @@ -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