Merge pull request #168 from yjs/fix-absolute-position-calculation

fix absolute position calculation
This commit is contained in:
Kevin Jahns
2019-09-23 11:09:48 +02:00
committed by GitHub

View File

@@ -228,7 +228,7 @@ export const createAbsolutePositionFromRelativePosition = (rpos, doc) => {
return null
}
type = right.parent
if (type._item !== null && !type._item.deleted) {
if (type._item === null || !type._item.deleted) {
index = right.deleted || !right.countable ? 0 : res.diff
let n = right.left
while (n !== null) {