1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Fix macOS version parsing

This commit is contained in:
Denis Demchenko
2017-08-17 23:48:44 +03:00
parent b2aded435b
commit 5c753edb75
2 changed files with 10 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ export default [
{
test: [/macintosh/i],
describe(ua) {
const version = getFirstMatch(/mac os x (\d+(\.\d+)*)/i, ua).replace(/[_\s]/g, '.');
const version = getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, '.');
return {
name: 'macOS',
version