Add undefined check to 'document' variable in platform_utils
This commit is contained in:
parent
ed0c8d8d8b
commit
5e5dec07b0
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ mediapipe/provisioning_profile.mobileprovision
|
|||
node_modules/
|
||||
.configure.bazelrc
|
||||
.user.bazelrc
|
||||
.idea/
|
|
@ -32,5 +32,5 @@ export function isIOS() {
|
|||
// tslint:disable-next-line:deprecation
|
||||
].includes(navigator.platform)
|
||||
// iPad on iOS 13 detection
|
||||
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
|
||||
|| (navigator.userAgent.includes('Mac') && (window.document !== undefined && 'ontouchend' in document));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user