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
|
||||
|
||||
const hydrate: RootHydrateFunction = (vnode, container) => {
|
||||
if (__DEV__ && !container.hasChildNodes()) {
|
||||
warn(
|
||||
`Attempting to hydrate existing markup but container is empty. ` +
|
||||
`Performing full mount instead.`
|
||||
)
|
||||
if (!container.hasChildNodes()) {
|
||||
__DEV__ &&
|
||||
warn(
|
||||
`Attempting to hydrate existing markup but container is empty. ` +
|
||||
`Performing full mount instead.`
|
||||
)
|
||||
patch(null, vnode, container)
|
||||
flushPostFlushCbs()
|
||||
return
|
||||
}
|
||||
hasMismatch = false
|
||||
|
Loading…
Reference in New Issue
Block a user