We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fac67ca commit 3e6fa6bCopy full SHA for 3e6fa6b
packages/device/package.json
@@ -1,7 +1,7 @@
1
{
2
"name": "universal-device",
3
"author": "rax",
4
- "version": "2.3.0",
+ "version": "2.3.1",
5
"license": "BSD-3-Clause",
6
"main": "lib/index.js",
7
"files": [
packages/device/src/web/index.ts
@@ -1,8 +1,8 @@
function getPlatform() {
const platform = navigator.platform;
if (platform) {
- if (/(iphone|ipod|ipad)/.test(navigator.userAgent)) return 'iOS';
- if (/android/.test(navigator.userAgent)) return 'Android';
+ if (/(iphone|ipod|ipad)/.test(navigator.userAgent.toLowerCase())) return 'iOS';
+ if (/android/.test(navigator.userAgent.toLowerCase())) return 'Android';
return platform;
}
8
return;
0 commit comments