From 991fabb0bda1d2b3de9a08dbab1d8a53c9ad52cf Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Wed, 14 Aug 2024 21:45:29 +0900 Subject: [PATCH] refactor(zoom): navigator to be referenced from window 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", () => {}); }