From 5a2c4fd4b22b70e49114213d2aa2f372029a6f63 Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Wed, 14 Aug 2024 21:56:07 +0900 Subject: [PATCH] refactor(zoom): navigator to be referenced from window (#3869) update the use of navigator object from window Ref #3857 --- src/ChartInternal/interactions/zoom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChartInternal/interactions/zoom.ts b/src/ChartInternal/interactions/zoom.ts index 722084974..c2558f315 100644 --- a/src/ChartInternal/interactions/zoom.ts +++ b/src/ChartInternal/interactions/zoom.ts @@ -338,7 +338,7 @@ export default { // https://bugs.webkit.org/show_bug.cgi?id=226683#c3 // https://stackoverflow.com/questions/67836886/wheel-event-is-not-fired-on-a-svg-group-element-in-safari if ( - window.GestureEvent && /^((?!chrome|android|mobile).)*safari/i.test(navigator.userAgent) + window.GestureEvent && /^((?!chrome|android|mobile).)*safari/i.test(window.navigator?.userAgent) ) { svg.on("wheel", () => {}); }