Skip to content

Commit 13995cb

Browse files
committed
fix(renderer): simplify async component placeholder resolution logic
1 parent d186fd4 commit 13995cb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/runtime-core/src/renderer.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,17 +2579,14 @@ export function invalidateMount(hooks: LifecycleHook): void {
25792579
}
25802580

25812581
function resolveAsyncComponentPlaceholder(anchorVnode: VNode) {
2582-
// anchor vnode is a unresolved async component
25832582
if (anchorVnode.placeholder) {
25842583
return anchorVnode.placeholder
25852584
}
25862585

25872586
// anchor vnode maybe is a wrapper component has single unresolved async component
2588-
const asyncWrapper = anchorVnode.component
2589-
if (asyncWrapper) {
2590-
const subTree = asyncWrapper.subTree
2591-
// try to locate deeper nested async component placeholder
2592-
return resolveAsyncComponentPlaceholder(subTree)
2587+
const instance = anchorVnode.component
2588+
if (instance) {
2589+
return resolveAsyncComponentPlaceholder(instance.subTree)
25932590
}
25942591

25952592
return null

0 commit comments

Comments
 (0)