Skip to content

Commit

Permalink
fix(hydration): improve template node check
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Nov 2, 2023
1 parent 9ca468c commit e45c020
Show file tree
Hide file tree
Showing 2 changed files with 1,369 additions and 1,434 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function createHydrationFunctions(
break
case Comment:
if (domType !== DOMNodeTypes.COMMENT || isFragmentStart) {
if ((node as Element).tagName.toLowerCase() === 'template') {
if (isTemplateNode(node as Element)) {
const content = (vnode.el! as HTMLTemplateElement).content
.firstChild!

Expand Down
Loading

0 comments on commit e45c020

Please sign in to comment.