Skip to content

Commit d186fd4

Browse files
committed
chore: tweaks
1 parent d368ab3 commit d186fd4

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/runtime-core/__tests__/components/Suspense.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ describe('Suspense', () => {
23612361
})
23622362

23632363
// #14173
2364-
test('renders multiple async component wrappers in Suspense with v-for and updates on items change', async () => {
2364+
test('nested async components with v-for + only Suspense and async component wrappers', async () => {
23652365
const CompAsyncSetup = defineAsyncComponent({
23662366
props: ['item', 'id'],
23672367
render(ctx: any) {

packages/runtime-core/src/renderer.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,8 +1995,7 @@ function baseCreateRenderer(
19951995
const anchorVNode = c2[nextIndex + 1] as VNode
19961996
const anchor =
19971997
nextIndex + 1 < l2
1998-
? // #13559, #14173
1999-
// fallback to el placeholder for unresolved async component
1998+
? // #13559, #14173 fallback to el placeholder for unresolved async component
20001999
anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
20012000
: parentAnchor
20022001
if (newIndexToOldIndexMap[i] === 0) {
@@ -2589,12 +2588,6 @@ function resolveAsyncComponentPlaceholder(anchorVnode: VNode) {
25892588
const asyncWrapper = anchorVnode.component
25902589
if (asyncWrapper) {
25912590
const subTree = asyncWrapper.subTree
2592-
2593-
// wrapper that directly contains an unresolved async component
2594-
if (subTree.placeholder) {
2595-
return subTree.placeholder
2596-
}
2597-
25982591
// try to locate deeper nested async component placeholder
25992592
return resolveAsyncComponentPlaceholder(subTree)
26002593
}

0 commit comments

Comments
 (0)