Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b958b72f1d | ||
|
|
89a920df68 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "11.0.0",
|
||||
"version": "11.0.2",
|
||||
"homepage": "y-js.org",
|
||||
"authors": [
|
||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||
|
||||
8
y.es6
8
y.es6
@@ -54,7 +54,7 @@ module.exports = function (Y/* :any */) {
|
||||
this.broadcastedHB = false
|
||||
this.syncStep2 = Promise.resolve()
|
||||
this.broadcastOpBuffer = []
|
||||
this.protocolVersion = 10
|
||||
this.protocolVersion = 11
|
||||
}
|
||||
reconnect () {
|
||||
}
|
||||
@@ -2709,13 +2709,15 @@ module.exports = function (Y /* : any*/) {
|
||||
if (op.struct === 'Insert') {
|
||||
for (var i = this.waiting.length - 1; i >= 0; i--) {
|
||||
let w = this.waiting[i]
|
||||
// TODO: do I handle split operations correctly here? Super unlikely, but yeah..
|
||||
// Also: can this case happen? Can op be inserted in the middle of a larger op that is in $waiting?
|
||||
if (w.struct === 'Insert') {
|
||||
if (Y.utils.compareIds(op.left, w.id)) {
|
||||
if (Y.utils.matchesId(w, op.left)) {
|
||||
// include the effect of op in w
|
||||
w.right = op.id
|
||||
// exclude the effect of w in op
|
||||
op.left = w.left
|
||||
} else if (Y.utils.compareIds(op.right, w.id)) {
|
||||
} else if (Y.utils.matchesId(w, op.right)) {
|
||||
// similar..
|
||||
w.left = op.id
|
||||
op.right = w.right
|
||||
|
||||
Reference in New Issue
Block a user