mirror of https://github.com/vuejs/core.git
fix(suspence): fix newBranch shapeFlag not reset under hmr
This commit is contained in:
parent
119f18c773
commit
d2e2a192ef
|
@ -235,7 +235,7 @@ function patchSuspense(
|
|||
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense
|
||||
if (pendingBranch) {
|
||||
suspense.pendingBranch = newBranch
|
||||
if (isSameVNodeType(newBranch, pendingBranch)) {
|
||||
if (isSameVNodeType(pendingBranch, newBranch)) {
|
||||
// same root type but content may have changed.
|
||||
patch(
|
||||
pendingBranch,
|
||||
|
@ -321,7 +321,7 @@ function patchSuspense(
|
|||
)
|
||||
setActiveBranch(suspense, newFallback)
|
||||
}
|
||||
} else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
||||
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
||||
// toggled "back" to current active branch
|
||||
patch(
|
||||
activeBranch,
|
||||
|
@ -355,7 +355,7 @@ function patchSuspense(
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
||||
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
||||
// root did not change, just normal patch
|
||||
patch(
|
||||
activeBranch,
|
||||
|
|
Loading…
Reference in New Issue