8000 fix(ssr): ensure empty slots render as a comment node in Transition by edison1105 · Pull Request #13396 · vuejs/core · GitHub
[go: up one dir, main page]

Skip to content

fix(ssr): ensure empty slots render as a comment node in Transition #13396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(hydration): handle empty content in Transition appear edge case
  • Loading branch information
edison1105 committed May 28, 2025
commit a890378b5e9e02b469ee6c1e03540dc896ece122
3 changes: 2 additions & 1 deletion packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ export function createHydrationFunctions(
// replace node
const parentNode = oldNode.parentNode
if (parentNode) {
parentNode.replaceChild(newNode, oldNode)
if (newNode) parentNode.replaceChild(newNode, oldNode)
else remove(oldNode)
}

// update vnode
Expand Down
0