pixu1980 / detector-js

DetectorJS, zero-dependency platform/environment detector written in ES6
http://detector.js.org
MIT License
30 stars 7 forks source link

detector.js:751 cannot read property 'toLowerCase' of undefined #15

Closed AlexNovicov closed 3 years ago

AlexNovicov commented 4 years ago

I am get an error - https://i.imgur.com/sHm6y0D.png

ghost commented 3 years ago

this should be fixed. sorry for late answer.... anyhow you should check if something else is overriding the toLowerCase native method of js strings.

as i see from that screenshot, there's something overriding the toString method of functions....

can u check this?

ghost commented 3 years ago

the whole stack is not regarding methods of detector it happens on a keyDown event of something

sHm6y0D

i mean, i don't even get why detector.js code is doing something on handleKeyDown event handler.... and is also running in an "eval" method call.... eval is evil.

May i help in some way?

AlexNovicov commented 3 years ago

Sorry, but this question was quite a long time ago and I don't remember where it came from

ghost commented 3 years ago

You're right.

Anyhow... i'm sorry for my late answer!