force that transactions that apply document updates are set as non-local transatctions. Fixes #307

This commit is contained in:
Kevin Jahns
2021-05-31 17:54:24 +02:00
parent c72ac448e9
commit 71d8da6513
2 changed files with 40 additions and 0 deletions

View File

@@ -380,6 +380,8 @@ export const writeStructsFromTransaction = (encoder, transaction) => writeClient
*/
export const readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = new UpdateDecoderV2(decoder)) =>
transact(ydoc, transaction => {
// force that transaction.local is set to non-local
transaction.local = false
let retry = false
const doc = transaction.doc
const store = doc.store