slightly optimize TreeWalker and integration process

This commit is contained in:
Kevin Jahns
2025-02-24 20:30:48 +01:00
parent 4b865764b8
commit cc9a857441
2 changed files with 7 additions and 4 deletions

View File

@@ -96,8 +96,12 @@ export class YXmlTreeWalker {
} else {
// walk right or up in the tree
while (n !== null) {
if (n.right !== null) {
n = n.right
/**
* @type {Item | null}
*/
const nxt = n.next
if (nxt !== null) {
n = nxt
break
} else if (n.parent === this._root) {
n = null