We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b72fa6 commit 25dbceeCopy full SHA for 25dbcee
packages/runtime-vapor/src/dom/template.ts
@@ -1,5 +1,5 @@
1
import { isHydrating } from './hydration'
2
-import { createTextNode } from './node'
+import { child, createTextNode } from './node'
3
import { NodeRef, type VaporNode } from './nodeDraft'
4
5
let t: HTMLTemplateElement
@@ -18,7 +18,7 @@ export function template(html: string, root?: boolean) {
18
if (!node) {
19
t = t || document.createElement('template')
20
t.innerHTML = html
21
- node = t.content.firstChild!
+ node = child(t) as Node
22
}
23
const ret = node.cloneNode(true)
24
if (root) (ret as any).$root = true
0 commit comments