Skip to content

Commit

Permalink
fix(runtime-core): show hydration mismatch details for non-rectified …
Browse files Browse the repository at this point in the history
…mismatches too when __PROD_HYDRATION_MISMATCH_DETAILS__ is set (#10599)
  • Loading branch information
brc-dd authored Apr 2, 2024
1 parent 5aaa758 commit 0dea7f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ TODOs.md
.eslintcache
dts-build/packages
*.tsbuildinfo
*.tgz
3 changes: 2 additions & 1 deletion packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,15 @@ export function createHydrationFunctions(
if (props) {
if (
__DEV__ ||
__FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__ ||
forcePatch ||
!optimized ||
patchFlag & (PatchFlags.FULL_PROPS | PatchFlags.NEED_HYDRATION)
) {
for (const key in props) {
// check hydration mismatch
if (
__DEV__ &&
(__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) &&
propHasMismatch(el, key, props[key], vnode, parentComponent)
) {
hasMismatch = true
Expand Down

0 comments on commit 0dea7f9

Please sign in to comment.