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

fix(display): add hydrate checks for getPlatform #16828

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

johnleider
Copy link
Member

Motivation and Context

fixes #16825

Markup

Not sure the best way to test this but from @KaelWD's comment, I assume this is the fix

@johnleider johnleider added T: bug Functionality that does not work as intended/expected E: display Display composable labels Mar 3, 2023
@johnleider johnleider added this to the v3.x.x milestone Mar 3, 2023
@johnleider johnleider requested a review from KaelWD March 3, 2023 19:43
@johnleider johnleider self-assigned this Mar 3, 2023
@KaelWD KaelWD modified the milestones: v3.x.x, v3.1.x Mar 7, 2023
Comment on lines +178 to +180
const mobile = !platform.value.ssr
? width.value < breakpointValue
: platform.android || platform.ios || platform.opera
: platform.value.android || platform.value.ios || platform.value.opera
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but this seems kinda off. If ssr the other three will always be false, so really it's just checking width < mobileBreakpoint except that would be true for ssr

@KaelWD KaelWD merged commit 3a41fb7 into master Mar 7, 2023
@KaelWD KaelWD deleted the fix/16825-display-hydration branch March 7, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: display Display composable T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.1.4] useDisplay v-if Hydration node mismatch
2 participants