Skip to content

Commit 290a320

Browse files
committed
refactor for consistency
1 parent e213c99 commit 290a320

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

feature-detection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const isMac = (function () {
55
if (navigator.userAgentData && navigator.userAgentData.platform)
66
return navigator.userAgentData.platform === 'macOS'
77

8-
return /Mac|iP/.test(navigator.platform)
8+
return /Mac|iPhone|iPad/.test(navigator.platform)
99
}())
1010

1111

@@ -14,7 +14,7 @@ export const isSafari = typeof navigator !== 'undefined'
1414

1515

1616
export const isIos = typeof navigator !== 'undefined'
17-
&& ['iPhone', 'iPad'].includes(navigator.platform)
17+
&& /iPhone|iPad/.test(navigator.platform)
1818

1919

2020
export const touchSupported = typeof document !== 'undefined'

0 commit comments

Comments
 (0)