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", () => {}); }