From 7db868cc293dfee6c4c149dcd45363cd312ae21c Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Thu, 17 Aug 2017 23:35:40 +0300 Subject: [PATCH] Fix macOS version parser Make it able to read all the numbers with dots --- src/parser-os.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser-os.js b/src/parser-os.js index 07177a2..f37adb8 100644 --- a/src/parser-os.js +++ b/src/parser-os.js @@ -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