fix(ssr): ensure behavior consistency between prod/dev when mounting SSR app to empty containers
close #4034
This commit is contained in:
parent
34d4991dd5
commit
33708e8bf4
@ -57,12 +57,14 @@ export function createHydrationFunctions(
|
|||||||
} = rendererInternals
|
} = rendererInternals
|
||||||
|
|
||||||
const hydrate: RootHydrateFunction = (vnode, container) => {
|
const hydrate: RootHydrateFunction = (vnode, container) => {
|
||||||
if (__DEV__ && !container.hasChildNodes()) {
|
if (!container.hasChildNodes()) {
|
||||||
warn(
|
__DEV__ &&
|
||||||
`Attempting to hydrate existing markup but container is empty. ` +
|
warn(
|
||||||
`Performing full mount instead.`
|
`Attempting to hydrate existing markup but container is empty. ` +
|
||||||
)
|
`Performing full mount instead.`
|
||||||
|
)
|
||||||
patch(null, vnode, container)
|
patch(null, vnode, container)
|
||||||
|
flushPostFlushCbs()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
hasMismatch = false
|
hasMismatch = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user