make sure that markers are correct without reinit

This commit is contained in:
Kevin Jahns
2021-12-06 21:22:18 +01:00
parent 4356d70ed0
commit 6230abb78c
3 changed files with 1 additions and 16 deletions

View File

@@ -1,5 +1,4 @@
import * as error from 'lib0/error'
import { getItem } from 'yjs'
import {
getItemCleanStart,
@@ -74,18 +73,6 @@ export class ListIterator {
return iter
}
/**
* @param {Transaction} tr
*/
reinit (tr) {
if (this.nextItem) {
const nextId = this.nextItem.id
const reinitId = createID(nextId.client, nextId.clock + this.rel)
this.nextItem = getItem(tr.doc.store, reinitId)
this.rel = reinitId.clock - this.nextItem.id.clock
}
}
/**
* @type {Item | null}
*/