Skip to content

Commit 33708e8

Browse files
committed
fix(ssr): ensure behavior consistency between prod/dev when mounting SSR app to empty containers
close #4034
1 parent 34d4991 commit 33708e8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/runtime-core/src/hydration.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ export function createHydrationFunctions(
5757
} = rendererInternals
5858

5959
const hydrate: RootHydrateFunction = (vnode, container) => {
60-
if (__DEV__ && !container.hasChildNodes()) {
61-
warn(
62-
`Attempting to hydrate existing markup but container is empty. ` +
63-
`Performing full mount instead.`
64-
)
60+
if (!container.hasChildNodes()) {
61+
__DEV__ &&
62+
warn(
63+
`Attempting to hydrate existing markup but container is empty. ` +
64+
`Performing full mount instead.`
65+
)
6566
patch(null, vnode, container)
67+
flushPostFlushCbs()
6668
return
6769
}
6870
hasMismatch = false

0 commit comments

Comments
 (0)