Skip to content

Commit

Permalink
fix(runtime-core): enter optimized mode for component as root
Browse files Browse the repository at this point in the history
fix #3943
  • Loading branch information
yyx990803 committed Jul 15, 2021
1 parent 1cfe290 commit 68365b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ function baseCreateRenderer(
parentSuspense = null,
isSVG = false,
slotScopeIds = null,
optimized = false
optimized = __DEV__ && isHmrUpdating ? false : !!n2.dynamicChildren
) => {
// patching & not same type, unmount old tree
if (n1 && !isSameVNodeType(n1, n2)) {
Expand Down Expand Up @@ -772,7 +772,7 @@ function baseCreateRenderer(
parentSuspense,
isSVG && type !== 'foreignObject',
slotScopeIds,
optimized || !!vnode.dynamicChildren
optimized
)
}

Expand Down

0 comments on commit 68365b9

Please sign in to comment.