expensify-common 2.0.163 → 2.0.164
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/dist/Device.js +11 -5
- package/package.json +1 -1
package/dist/Device.js
CHANGED
|
@@ -4,11 +4,17 @@ exports.getOSAndName = getOSAndName;
|
|
|
4
4
|
const ua_parser_js_1 = require("ua-parser-js");
|
|
5
5
|
function getOSAndName() {
|
|
6
6
|
const parser = new ua_parser_js_1.UAParser();
|
|
7
|
-
const
|
|
7
|
+
const { browser, os } = parser.getResult();
|
|
8
|
+
let osVersion = os.version;
|
|
9
|
+
// Detection logic inspired by UAParser guide on iOS 26:
|
|
10
|
+
// https://docs.uaparser.dev/guides/how-to-detect-ios-26-using-javascript.html
|
|
11
|
+
if (browser.name === 'Mobile Safari' && browser.major === '26' && os.name === 'iOS' && os.version === '18.6') {
|
|
12
|
+
osVersion = '26';
|
|
13
|
+
}
|
|
8
14
|
return {
|
|
9
|
-
os:
|
|
10
|
-
osVersion
|
|
11
|
-
deviceName:
|
|
12
|
-
deviceVersion:
|
|
15
|
+
os: os.name,
|
|
16
|
+
osVersion,
|
|
17
|
+
deviceName: browser.name,
|
|
18
|
+
deviceVersion: browser.version,
|
|
13
19
|
};
|
|
14
20
|
}
|