mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Continue fix for mixed apply remote operations ops and non-ops.
This commit is contained in:
parent
3ebad4902d
commit
8b0bd1d04d
@ -125,6 +125,8 @@ export const AutomergeEditor = {
|
|||||||
if (operations.length) {
|
if (operations.length) {
|
||||||
const slateOps = toSlateOp(operations, current)
|
const slateOps = toSlateOp(operations, current)
|
||||||
|
|
||||||
|
// do not change isRemote flag for no-op case.
|
||||||
|
const wasRemote = e.isRemote
|
||||||
e.isRemote = true
|
e.isRemote = true
|
||||||
|
|
||||||
Editor.withoutNormalizing(e, () => {
|
Editor.withoutNormalizing(e, () => {
|
||||||
@ -145,7 +147,7 @@ export const AutomergeEditor = {
|
|||||||
// XXX: only schedule set isRemote false when we did scheduled onChange by apply.
|
// XXX: only schedule set isRemote false when we did scheduled onChange by apply.
|
||||||
Promise.resolve().then(_ => (e.isRemote = false))
|
Promise.resolve().then(_ => (e.isRemote = false))
|
||||||
} else {
|
} else {
|
||||||
e.isRemote = false
|
e.isRemote = wasRemote
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user