diff --git a/packages/x-charts/src/hooks/useReducedMotion.ts b/packages/x-charts/src/hooks/useReducedMotion.ts index 75c361672fac3..d1c89b25611f5 100644 --- a/packages/x-charts/src/hooks/useReducedMotion.ts +++ b/packages/x-charts/src/hooks/useReducedMotion.ts @@ -3,7 +3,7 @@ import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web'; const handleMediaChange = (e: { matches: boolean | undefined }) => { Globals.assign({ // Modification such the react-spring implementation such that this hook can remove animation but never activate animation. - skipAnimation: e.matches || undefined, + skipAnimation: e.matches, }); }; @@ -19,8 +19,6 @@ export const useReducedMotion = () => { useIsomorphicLayoutEffect(() => { const shouldSkipAnimation = - // Skip animation in SSR - typeof window === 'undefined' || // Skip animation test/jsdom !window?.matchMedia;