Don't access "document" in WebWorker
Fixes https://github.com/google/mediapipe/issues/4694 PiperOrigin-RevId: 557885230
This commit is contained in:
parent
ed0c8d8d8b
commit
990bfd2e3e
|
@ -32,5 +32,6 @@ export function isIOS() {
|
||||||
// tslint:disable-next-line:deprecation
|
// tslint:disable-next-line:deprecation
|
||||||
].includes(navigator.platform)
|
].includes(navigator.platform)
|
||||||
// iPad on iOS 13 detection
|
// iPad on iOS 13 detection
|
||||||
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
|
|| (navigator.userAgent.includes('Mac') &&
|
||||||
|
(typeof document !== undefined && 'ontouchend' in document));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user