Closed oliviertassinari closed 3 years ago
We are experiencing this issue too. Happy to help out with testing if needed
Fix made in https://github.com/cssinjs/jss/pull/1446. At this point, it's outside of the control of Material-UI.
Thanks @oliviertassinari & @kof, appreciate the work you guys did to figure this one!
Expected behavior:
No crash
Describe the bug:
When rendering:
Chrome 88 crashes.
CSS.px(NaN)
isn't flying well.Codesandbox link:
https://codesandbox.io/s/react-jss-ts-forked-nl2rf?file=/src/App.tsx
Versions (please complete the following information):
I have investigated the issue from https://github.com/mui-org/material-ui/issues/24519 and https://github.com/mui-org/material-ui/issues/24182. I'm not sure it's worth fixing here but I thought it would be interesting to report anyway.
It fails because
typeof NaN === 'number'
:https://github.com/cssinjs/jss/blob/94c8f6c7e5eee7ce04c31ea2f7e318a5d5b2a082/packages/jss-plugin-default-unit/src/index.js#L43
The fix should be straightforward.