Skip to content

Commit

Permalink
fix(runtime-core): correctly assign suspenseId to avoid conflicts wit…
Browse files Browse the repository at this point in the history
…h the default id
  • Loading branch information
RicardoErii committed Jan 1, 2024
1 parent 24d77c2 commit 6408c43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/components/Suspense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function patchSuspense(
} else {
// toggled before pending tree is resolved
// increment pending ID. this is used to invalidate async callbacks
suspense.pendingId = suspenseId++
suspense.pendingId = ++suspenseId
if (isHydrating) {
// if toggled before hydration is finished, the current DOM tree is
// no longer valid. set it as the active branch so it will be unmounted
Expand Down Expand Up @@ -356,7 +356,7 @@ function patchSuspense(
if (newBranch.shapeFlag & ShapeFlags.COMPONENT_KEPT_ALIVE) {
suspense.pendingId = newBranch.component!.suspenseId!
} else {
suspense.pendingId = suspenseId++
suspense.pendingId = ++suspenseId
}
patch(
null,
Expand Down

0 comments on commit 6408c43

Please sign in to comment.