fix initial content in y-array

This commit is contained in:
Kevin Jahns
2017-12-19 17:37:04 +01:00
parent 24c1e4dcc8
commit 5586334549
3 changed files with 12 additions and 3 deletions

View File

@@ -207,8 +207,12 @@ export default class YArray extends Type {
prevJsonIns._content.push(c)
}
}
if (prevJsonIns !== null && y !== null) {
prevJsonIns._integrate(y)
if (prevJsonIns !== null) {
if (y !== null) {
prevJsonIns._integrate(y)
} else if (prevJsonIns._left === null) {
this._start = prevJsonIns
}
}
})
}