Skip to content
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

Incorrect SSR Rendering #5859

Closed
hit12369 opened this issue May 4, 2022 · 0 comments
Closed

Incorrect SSR Rendering #5859

hit12369 opened this issue May 4, 2022 · 0 comments
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. scope: ssr

Comments

@hit12369
Copy link

hit12369 commented May 4, 2022

Version

3.2.33

Reproduction link

stackblitz.com

Steps to reproduce

SSR renders nothing if a fragment is inside a slot. This causes hydration mismatch.

What is expected?

SSR renders nothing, but should render Hello World

What is actually happening?

SSR renders nothing and causes hydration mismatch.


This seems to be happening because isComment function in ssrRenderSlot returns true in case of fragments because of incorrect regex.

const commentRE = /^<!--.*-->$/
function isComment(item: SSRBufferItem) {
return typeof item === 'string' && commentRE.test(item)
}

@yyx990803 yyx990803 added scope: ssr ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. labels May 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. scope: ssr
Projects
None yet
Development

No branches or pull requests

2 participants