Skip to content

Commit 8229e21

Browse files
committed
fix: main thread is blocked on Mac device
fix #139
1 parent fac39d3 commit 8229e21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export function isIOS() {
207207
'iPod',
208208
].includes(navigator.platform)
209209
// iPad on iOS 13 detection
210-
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
210+
|| (navigator.userAgent.includes('Mac') && typeof document !== 'undefined' && 'ontouchend' in document);
211211
return isIOS.cachedResult;
212212
}
213213

0 commit comments

Comments
 (0)