chore: update

This commit is contained in:
daiwei 2025-09-29 10:53:08 +08:00
parent 0436ceac77
commit ba48c8ab57
1 changed files with 3 additions and 3 deletions

View File

@ -139,16 +139,16 @@ export function disableHydrationNodeLookup(): void {
} }
export function locateChildByLogicalIndex( export function locateChildByLogicalIndex(
node: InsertionParent, parent: InsertionParent,
logicalIndex: number, logicalIndex: number,
): Node | null { ): Node | null {
let child = (node.$lastLogicalChild || node.firstChild) as ChildItem let child = (parent.$lastLogicalChild || parent.firstChild) as ChildItem
let fromIndex = child.$idx || 0 let fromIndex = child.$idx || 0
while (child) { while (child) {
if (fromIndex === logicalIndex) { if (fromIndex === logicalIndex) {
child.$idx = logicalIndex child.$idx = logicalIndex
return (node.$lastLogicalChild = child) return (parent.$lastLogicalChild = child)
} }
child = ( child = (