TiagoDanin / Locale-Codes

Language codes & country codes
MIT License
52 stars 5 forks source link

Uncaught TypeError: Cannot read properties of null (reading 'toLowerCase') #41

Open missinglink opened 6 months ago

missinglink commented 6 months ago
node
Welcome to Node.js v21.7.3.
Type ".help" for more information.

> const locale = require('locale-codes')
undefined

> locale.where('iso639-1', 'en')
Uncaught TypeError: Cannot read properties of null (reading 'toLowerCase')
    at /Users/peter/code/missinglink/places/node_modules/locale-codes/index.js:51:42
    at Array.find (<anonymous>)
    at Object.where (/Users/peter/code/missinglink/places/node_modules/locale-codes/index.js:51:13)
Shatlyk1011 commented 2 months ago

I changed locally the line you changed, but the error still remains.