Przeglądaj źródła

feat: add ipados to list of Platform.OS (#8205)

* feat: add ipados list of Platform.OS
master
Marc Seitz 4 lat temu
rodzic
commit
16d88a288f
No account linked to committer's email address
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2
    2
      react/features/base/react/Platform.web.js

+ 2
- 2
react/features/base/react/Platform.web.js Wyświetl plik

@@ -1,11 +1,11 @@
1 1
 /* @flow */
2 2
 
3
-const { userAgent } = navigator;
3
+const { userAgent, maxTouchPoints, platform } = navigator;
4 4
 let OS;
5 5
 
6 6
 if (userAgent.match(/Android/i)) {
7 7
     OS = 'android';
8
-} else if (userAgent.match(/iP(ad|hone|od)/i)) {
8
+} else if (userAgent.match(/iP(ad|hone|od)/i) || (maxTouchPoints && maxTouchPoints > 2 && /MacIntel/.test(platform))) {
9 9
     OS = 'ios';
10 10
 } else if (userAgent.match(/Mac(intosh| OS X)/i)) {
11 11
     OS = 'macos';

Ładowanie…
Anuluj
Zapisz