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

[Bug] TypeError: Cannot read property '0' of undefined #53

Closed
guilatrova opened this issue Jun 20, 2020 · 2 comments
Closed

[Bug] TypeError: Cannot read property '0' of undefined #53

guilatrova opened this issue Jun 20, 2020 · 2 comments

Comments

@guilatrova
Copy link

After deleting yarn.lock to retry a fresh install, whenever I click "Customize" it suddenly breaks with this message:

TypeError: Cannot read property '0' of undefined
(anonymous function)
src/package/components/banner/user_actions_row/customize_dialog/palettes_list/palettes_list.jsx:97
   94 | palette={['primary', 'secondary', 'tertiary'].reduce(
   95 |     (acc, keyName, index) => ({
   96 |         ...acc,
>  97 |         [keyName]: { 500: item[index] }
      | ^   98 |     }),
   99 |     {}
  100 | )}
View compiled
(anonymous function)
src/package/components/banner/user_actions_row/customize_dialog/palettes_list/palettes_list.jsx:94
  91 |     tooltipPopper: classes.tooltipPopper,
  92 |     color: classes.paletteVisualColor
  93 | }}
> 94 | palette={['primary', 'secondary', 'tertiary'].reduce(
     | ^  95 |     (acc, keyName, index) => ({
  96 |         ...acc,
  97 |         [keyName]: { 500: item[index] }
View compiled
PalettesListCom
@clementdevos
Copy link
Contributor

Hey i think you shouldn't remove yarn.lock as it takes some liberties with the minor/beta versions, especially with react-spring which is still very much in beta right now

I've addressed this issue here #48 (comment)

It kinda sucks but while react-spring is not stable, i'm not taking the risk to have to change everything again in 2 weeks if their API changes soon.

TL;DR : don't use libraries in beta versions. :)

@clementdevos
Copy link
Contributor

closing this in favor of #48

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

2 participants