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

[website] Fix crash #28474

Merged
merged 4 commits into from Sep 20, 2021
Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 19, 2021

Initially, I wanted to fix https://twitter.com/sairaj2119/status/1439453551944552448. Open https://mui.com/core/ and click on "Table", it crashes

Screenshot 2021-09-19 at 13 43 53

but then I also noticed:

  • We were using flex gap -> removed it
  • We were having a dead prop -> removed it
  • getCookie silently returns undefined if read on the server -> throw to force making it the SSR handling safer

Fixes #28487

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Sep 19, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 19, 2021

No bundle size changes

Generated by 🚫 dangerJS against 5fb9e2c

docs/src/modules/utils/helpers.ts Outdated Show resolved Hide resolved
oliviertassinari and others added 2 commits September 19, 2021 14:24
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
if (parts.length === 2) {
return parts[1].split(';').shift();
}
if (typeof document === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

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

Adding a test would be nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

What would the test be about?

Copy link
Member

Choose a reason for hiding this comment

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

getCookie function that it returns the correct result. No strong opinion, it is just easier to me if there is a test I can see for input & output.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I see. I'm not aware of a precedent to test cookies, it could be interesting. I'm in the same boat, I don't really know how this function works.

@oliviertassinari oliviertassinari merged commit 2d24850 into mui:master Sep 20, 2021
@oliviertassinari oliviertassinari deleted the website-fix-crash branch September 20, 2021 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Production website mui.com is broken: /core/ clicking "Table" button leads to "Application error" message
4 participants