1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Fix macOS version parser

Make it able to read all the numbers with dots
This commit is contained in:
Denis Demchenko 2017-08-17 23:35:40 +03:00
parent 6976da7da5
commit 7db868cc29

View File

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