]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: update
authordaiwei <daiwei521@126.com>
Mon, 29 Sep 2025 14:25:42 +0000 (22:25 +0800)
committerdaiwei <daiwei521@126.com>
Mon, 29 Sep 2025 14:25:42 +0000 (22:25 +0800)
packages/runtime-vapor/src/dom/template.ts

index 7349113011a12140dcac581d87586331199fb952..991e508bed3c2028f10c3c72198b272f3f29d326 100644 (file)
@@ -9,7 +9,7 @@ export function template(
   root?: boolean,
 ): () => Node & { $root?: true } {
   let node: Node
-  const fn = () => {
+  return (): Node & { $root?: true } => {
     if (isHydrating) {
       // do not cache the adopted node in node because it contains child nodes
       // this avoids duplicate rendering of children
@@ -31,5 +31,4 @@ export function template(
     if (root) (ret as any).$root = true
     return ret
   }
-  return fn
 }