-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
TypeError: Cannot read property 'dense' of undefined #13716
Comments
That's weird. It seemed like this was working with the legacy context API #13498. I need to investigate why support for this was dropped and how this effects the List component. |
Upon further investigation it does seem like an issue with Could you provide a minimal reproducible example? |
I remember @gaearon warning about using react-tree-walker on Twitter. Also, it seems they are working on adding support for the new context API. I would suggest we close this issue as |
@Ak-lee Wait for the next release of react-tree-walker, it should be gone. In the meantime, you can rollback to Material-UI v3.3.0, before we have stoped using the deprecated context API. |
I find the error only throw out in a particular case. |
I can confirm that downgrading to 3.3.0 works, but still getting this error when using the latest version. |
@flamecoals Do you have a minimal reproducible example? |
when I use the material-ui in client side ,there is no problem, but when i use the material-ui's server rendering, once I use the
<ListItem>
component , there is a error:TypeError: Cannot read property 'dense' of undefined
the total info:
Warning: Rendering
<Context.Consumer.Provider>
is not supported and will be removed in a future major release. Did you mean to render<Context.Provider>
instead?Warning: Rendering
<Context.Consumer.Consumer>
is not supported and will be removed in a future major release. Did you mean to render<Context.Consumer>
instead?TypeError: Cannot read property 'dense' of undefined
at Object.eval [as children] (webpack:///./node_modules/@material-ui/core/ListItem/MergeListContext.js?:28:38)
at recursive (C:\Users\Administrator\Desktop\webpack-demo\node_modules\react-tree-walker\dist\react-tree-walker.js:129:41)
at C:\Users\Administrator\Desktop\webpack-demo\node_modules\react-tree-walker\dist\react-tree-walker.js:153:26
The server rendering config almost same as the official website,at present, the server work out only when I use the
<ListItem>
component.Your Environment 🌎
The text was updated successfully, but these errors were encountered: