Open rdsedmundo opened 1 year ago
ye I was also confused then saw this issue, I guess we need something like that until it resolves
for my case Fireforx 115 117 and >118 is fine
ua-parser-js
's getBrowser()
functions gives the right firefox version at the moment.
import Parser from 'ua-parser-js'
const ua_browser = ua.getBrowser()
const hacky_solution = ua_browser.name === 'Firefox' &&
(Number(ua_browser.version) === 115 || Number(ua_browser.version) === 117 || Number(ua_browser.version) >= 118)
This just came up for us, because the newest firefox version 118
, will be detected as 109
, which is no longer included in the defaults
browserslist configuration. (looking at the output of browserslist default
I am not sure, why this didn't come up earlier for us, but ¯_(ツ)_/¯
https://github.com/browserslist/browserslist-useragent/blob/b767e4d53dc712715ca9fe2d0e440b755da652c2/index.ts#L84-L90
I'm using Firefox 118.0.1 with user-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0
.My browserslist query is as follows:
Which returns, as of now, the following browsers:
The browserslist-useragent package thinks my Firefox is 109.0 (the Gecko version) instead of 118.0 (I have
allowHigherVersions
set), so it detects my browser as not supported. This doesn't seem right.