]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix lint
authorEvan You <yyx990803@gmail.com>
Thu, 19 May 2022 04:39:48 +0000 (12:39 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 19 May 2022 04:39:48 +0000 (12:39 +0800)
packages/runtime-core/src/hydration.ts

index a8a568cabb0c58a67deb192a7a9171c46c1c00cf..3dd9e806efe1796fbc4dbbc672a7a28c24994e67 100644 (file)
@@ -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) => {
@@ -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()