mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(server): process browser version with non semver versions (#4673)
This commit is contained in:
parent
471a32a1a8
commit
d3b939690c
@ -17,6 +17,9 @@ const isModernBrowser = (ua) => {
|
|||||||
}
|
}
|
||||||
const { browser } = UAParser(ua)
|
const { browser } = UAParser(ua)
|
||||||
const browserVersion = semver.coerce(browser.version)
|
const browserVersion = semver.coerce(browser.version)
|
||||||
|
if (!browserVersion) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return modernBrowsers[browser.name] && semver.gte(browserVersion, modernBrowsers[browser.name])
|
return modernBrowsers[browser.name] && semver.gte(browserVersion, modernBrowsers[browser.name])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user