Skip to content

Commit

Permalink
fix(server): process browser version with non semver versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aldarund committed Jan 2, 2019
1 parent 7dd33fe commit 5e29f13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/server/src/middleware/modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const isModernBrowser = (ua) => {
}
const { browser } = UAParser(ua)
const browserVersion = semver.coerce(browser.version)
if (!browserVersion) {
return false
}
return modernBrowsers[browser.name] && semver.gte(browserVersion, modernBrowsers[browser.name])
}

Expand Down

0 comments on commit 5e29f13

Please sign in to comment.