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

Does not recognize many local names, causes app to crash #25

Open
NashBaughn opened this issue Feb 3, 2022 · 1 comment
Open

Does not recognize many local names, causes app to crash #25

NashBaughn opened this issue Feb 3, 2022 · 1 comment

Comments

@NashBaughn
Copy link

Great package but not all the methods are entriely useable.

Using locale.where("local", inputValue) results in TypeError: Cannot read properties of null (reading 'toLowerCase') for many cases.

At first I thought it was due to different charcter sets, but no. Using local names "Brezhoneg", "Español", "العربية", "English"
and more all result in errors.

Oddly enough the local name "Afaraf" returns correctly (I imagine there are more, but did not find any).

@ndtreviv
Copy link

Another example:

> locale.where('location', 'us').name;
Uncaught TypeError: Cannot read properties of null (reading 'toLowerCase')
    at /Users/me/example/node_modules/locale-codes/index.js:51:42
    at Array.find (<anonymous>)
    at Object.where (/Users/me/example/node_modules/locale-codes/index.js:51:13)

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