Match-id-8aa73ad0d48d2def8668dac345dcae9358eb62c9

This commit is contained in:
* 2022-07-14 14:48:50 +08:00 committed by *
parent d3e3492640
commit 7baba42281
1 changed files with 4 additions and 0 deletions

View File

@ -199,6 +199,10 @@ export function calcStartUpdateVNode(treeRoot: VNode) {
for (let i = 1; i < startNodePath.length; i++) {
const pathIndex = Number(startNodePath[i]);
node = getChildByIndex(node, pathIndex)!;
// 路径错误时,回退到从根更新
if (node == null) {
return treeRoot;
}
}
return node;