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 e213c99 commit 290a320Copy full SHA for 290a320
feature-detection.js
@@ -5,7 +5,7 @@ export const isMac = (function () {
5
if (navigator.userAgentData && navigator.userAgentData.platform)
6
return navigator.userAgentData.platform === 'macOS'
7
8
- return /Mac|iP/.test(navigator.platform)
+ return /Mac|iPhone|iPad/.test(navigator.platform)
9
}())
10
11
@@ -14,7 +14,7 @@ export const isSafari = typeof navigator !== 'undefined'
14
15
16
export const isIos = typeof navigator !== 'undefined'
17
- && ['iPhone', 'iPad'].includes(navigator.platform)
+ && /iPhone|iPad/.test(navigator.platform)
18
19
20
export const touchSupported = typeof document !== 'undefined'
0 commit comments