Skip to content

Commit

Permalink
fix(hmr): full diff props for non-sfc component
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Oct 12, 2020
1 parent 2ae3b26 commit 0c1efde
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/runtime-core/src/componentProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ export function updateProps(
const [options] = instance.propsOptions

if (
// always force full diff if hmr is enabled
!(__DEV__ && instance.type.__hmrId) &&
// always force full diff in dev
// - #1942 if hmr is enabled with sfc component
// - vite#872 non-sfc component
!__DEV__ &&
(optimized || patchFlag > 0) &&
!(patchFlag & PatchFlags.FULL_PROPS)
) {
Expand Down

0 comments on commit 0c1efde

Please sign in to comment.