diff --git a/mediapipe/web/graph_runner/platform_utils.ts b/mediapipe/web/graph_runner/platform_utils.ts index d86e002de..a9a62a884 100644 --- a/mediapipe/web/graph_runner/platform_utils.ts +++ b/mediapipe/web/graph_runner/platform_utils.ts @@ -32,6 +32,5 @@ export function isIOS() { // tslint:disable-next-line:deprecation ].includes(navigator.platform) // iPad on iOS 13 detection - || (navigator.userAgent.includes('Mac') && - (typeof document !== undefined && 'ontouchend' in document)); + || (navigator.userAgent.includes('Mac') && 'ontouchend' in self.document); }