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

Cannot read properties of undefined (reading 'type') #1162

Open
VityaSchel opened this issue Dec 2, 2021 · 6 comments
Open

Cannot read properties of undefined (reading 'type') #1162

VityaSchel opened this issue Dec 2, 2021 · 6 comments

Comments

@VityaSchel
Copy link

tabsStyles
node_modules/@mui-treasury/styles/esm/tabs/apple/appleTabs.styles.js:9
   6 |     breakpoints = _ref.breakpoints;
   7 | return createStyles({
   8 |   root: {
>  9 |     backgroundColor: palette.type === 'light' ? '#eee' : palette.divider,
  10 |     borderRadius: 10,       ^
  11 |     minHeight: 44
  12 |   },
function Switch(props) {
  const tabsStyles = appleTabsStylesHook.useTabs()
  const tabItemStyles = appleTabsStylesHook.useTabItem()

  return (
    <Tabs
      classes={tabsStyles}
      // ...
    >
      <Tab classes={tabItemStyles} disableRipple label='Test' />
    </Tabs>
  )
}

React 17
@mui-treasury/styles@1.13.1
macOS 11.4

@VityaSchel
Copy link
Author

I'm not using styles btw, I tried using ThemeProvider + createTheme but then it crash with same error

@shirinapr
Copy link

les btw, I tried using ThemeProvider + createTheme but then it crash with same error

hey could you find a way to fix this?

@Lautaroef
Copy link

same error...

@VityaSchel
Copy link
Author

les btw, I tried using ThemeProvider + createTheme but then it crash with same error

hey could you find a way to fix this?

Yes, I used patch-package and then bundled my project with webpack, seems to work in production :suspect:

@Sitaras
Copy link

Sitaras commented Sep 22, 2022

same error...
any solution ?

@VityaSchel
Copy link
Author

same error...
any solution ?

use patch package as I mentioned earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants