ohzi-core 10.3.0 → 10.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "10.3.0",
3
+ "version": "10.3.2",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
package/src/Browser.js CHANGED
@@ -84,6 +84,7 @@ class Browser
84
84
  let version = 0;
85
85
 
86
86
  let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
87
+
87
88
  if (/trident/i.test(M[1]))
88
89
  {
89
90
  tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
@@ -94,8 +95,10 @@ class Browser
94
95
  tem = ua.match(/\b(OPR|Edge)\/(\d+)/);
95
96
  if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');
96
97
  }
98
+
97
99
  M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
98
- if ((tem = ua.match(/version\/(\d+)/i)) != null) M.splice(1, 1, tem[1]);
100
+ if ((tem = ua.match(/version\/(\d+(\.\d+)?)/i)) != null) M.splice(1, 1, tem[1]);
101
+
99
102
  version = M.join(' ');
100
103
 
101
104
  return Number(version.split(' ')[1]);