Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 19, 2022
1 parent 939209c commit 31bdde0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ export function createHydrationFunctions(
const {
mt: mountComponent,
p: patch,
o: { patchProp, nextSibling, parentNode, remove, insert, createComment }
o: {
patchProp,
createText,
nextSibling,
parentNode,
remove,
insert,
createComment
}
} = rendererInternals

const hydrate: RootHydrateFunction = (vnode, container) => {
Expand Down Expand Up @@ -113,11 +121,7 @@ export function createHydrationFunctions(
// #5728 empty text node inside a slot can cause hydration failure
// because the server rendered HTML won't contain a text node
if (vnode.children === '') {
insert(
(vnode.el = document.createTextNode('')),
node.parentElement!,
node
)
insert((vnode.el = createText('')), node.parentElement!, node)
nextNode = node
} else {
nextNode = onMismatch()
Expand Down

0 comments on commit 31bdde0

Please sign in to comment.