fix event.path in observeDeep - closes #457

This commit is contained in:
Kevin Jahns
2024-06-10 12:18:16 +02:00
parent 0973e0acd4
commit 0678ed1eb5
2 changed files with 25 additions and 2 deletions

View File

@@ -264,8 +264,8 @@ const getPathTo = (parent, child) => {
let i = 0
let c = /** @type {AbstractType<any>} */ (child._item.parent)._start
while (c !== child._item && c !== null) {
if (!c.deleted) {
i++
if (!c.deleted && c.countable) {
i += c.length
}
c = c.right
}