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

Wrong result for Opera mobile UA #49

Open
slawiko opened this issue Jul 28, 2020 · 0 comments
Open

Wrong result for Opera mobile UA #49

slawiko opened this issue Jul 28, 2020 · 0 comments

Comments

@slawiko
Copy link

slawiko commented Jul 28, 2020

I've found a strange behaviour. For User Agent Mozilla/5.0 (Linux; Android 9; ANE-LX3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Mobile Safari/537.36 OPR/59.1.2926.54067 and browserslist file

> 0.5%
last 2 major versions
not dead
ie 10-11

matchesUA function returns false.

I was playing a bit with code and I found out that here

browser.family.toLowerCase() === resolvedUserAgent.family.toLocaleLowerCase() &&

resolvedUserAgent is

{
 family: 'Opera Mobile',
 version: '59.1.2926'
}

and browser is

{
 family: 'OperaMobile',
 version: '46'
}

So looks like the issue hides in map

op_mob: 'OperaMobile',

I'm ready to do the PR, but I didn't dig deeper into details why this map looks like it looks and so on. That's why I would first contact maintainer and decide what is wrong and what should be done in order to fix this.

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