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
[website] Fix crash #28474
Conversation
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
if (parts.length === 2) { | ||
return parts[1].split(';').shift(); | ||
} | ||
if (typeof document === 'undefined') { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Initially, I wanted to fix https://twitter.com/sairaj2119/status/1439453551944552448. Open https://mui.com/core/ and click on "Table", it crashes
but then I also noticed:
Fixes #28487