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

False positive on Opera #17

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

False positive on Opera #17

seve opened this issue Jul 28, 2020 · 0 comments

Comments

@seve
Copy link

seve commented Jul 28, 2020

Environment

  • Plugin Version: v0.5.6
  • Webpack Version: v4.43.0
  • OS Version: v10.15.6
  • Node Version: v10.16.0
  • NPM Version: v6.13.7
  • Browser Version: v60.0.3255.95

Browserlist:

"browserslist": [
    "Chrome > 60",
    "Safari >= 10.1",
    "iOS >= 10.3",
    "Firefox >= 60",
    "Edge >= 15",
    "Opera > 61"
  ]

Current Behavior

HTML Template is not served.

Expected Behavior

HTML Template appears since Opera v60.0.3255.95 is < v61

Detailed Description

Placing a console log here on line 944 in obsoleteweb/dist/obsolete.js:

return some(normalizedTargetBrowsersOfTheSameName, function (targetBrowser) {
	      return some(currentBrowsers, function (currentBrowser) {
					console.log(currentBrowser, targetBrowser)
	        return currentBrowser.name === targetBrowser.name && compareVersion(currentBrowser.primaryVersion, targetBrowser.primaryVersion) !== compareVersion.LT;
	      });
	    });

returns

Browser {name: "chrome", version: "73.0.3683.103", primaryVersion: "73"} 
Browser {name: "chrome", version: "61", primaryVersion: "61"}

The user agent is "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.95". I believe the UA parser/authenticator sees that Chrome 73 satisfies the browserslist requirements and returns true before it is able to see that it does not pass the Opera requirements.

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