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

rawRarities not populating correctly #35

Open
Jaecen opened this issue Jan 28, 2021 · 0 comments
Open

rawRarities not populating correctly #35

Jaecen opened this issue Jan 28, 2021 · 0 comments

Comments

@Jaecen
Copy link

Jaecen commented Jan 28, 2021

I recently updated and app that uses react-keyrune and I'm getting the following error:

TypeError: Cannot read property 'replace' of undefined
Module../node_modules/@saeris/react-keyrune/es/keyrune.js
node_modules/@saeris/react-keyrune/es/keyrune.js:23
  20 |   return hash;
  21 | }, {});
  22 | 
> 23 | export var rarities = rawRarities.replace(/"+/g, "").split(" ");
  24 | 
  25 | var raritiesMap = new Map([].concat(rarities.map(function (rarity) {
  26 |   return [rarity, rarity];

You can replicate this same error by firing up the codesandbox.io link from the project homepage.

Firefox and Chrome give slightly different error messages (rawRarities is undefined vs Cannot read property 'replace' of undefined referring to rawRarities), but they are both reporting the same issue.

I've not been able to track down why this is happening. Moving the keyrune and react-keyrune versions back a few releases does not resolve it.

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

1 participant