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
commit 53e4028952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {