From e81fc5d0aa55f5349473c0cb8b87f5b989547a27 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 1 Nov 2023 14:06:03 -0700 Subject: [PATCH] Access document via self.document PiperOrigin-RevId: 578635298 --- mediapipe/web/graph_runner/platform_utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); }