mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Fix wrong isRemote false caused by the incorrect promise schedule case.
This commit is contained in:
parent
f65ab040ee
commit
3ebad4902d
@ -141,7 +141,12 @@ export const AutomergeEditor = {
|
||||
e.onCursor && e.onCursor(updated.cursors)
|
||||
})
|
||||
|
||||
Promise.resolve().then(_ => (e.isRemote = false))
|
||||
if (slateOps.length > 0) {
|
||||
// XXX: only schedule set isRemote false when we did scheduled onChange by apply.
|
||||
Promise.resolve().then(_ => (e.isRemote = false))
|
||||
} else {
|
||||
e.isRemote = false
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
Loading…
Reference in New Issue
Block a user