Skip to content

Commit

Permalink
fix(ssr): avoid hydration for hmr updating
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Oct 25, 2024
1 parent ed01d92 commit 2ea0046
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,12 +1208,12 @@ function baseCreateRenderer(
}
}

// avoid hydration for hmr updating
if (__DEV__ && isHmrUpdating) initialVNode.el = null

// setup() is async. This component relies on async logic to be resolved
// before proceeding
if (__FEATURE_SUSPENSE__ && instance.asyncDep) {
// avoid hydration for hmr updating
if (__DEV__ && isHmrUpdating) initialVNode.el = null

parentSuspense &&
parentSuspense.registerDep(instance, setupRenderEffect, optimized)

Expand Down

0 comments on commit 2ea0046

Please sign in to comment.