From 1acb43727871572526cb88ef968d164dcea0f12f Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Wed, 3 Jul 2019 21:49:26 +0300 Subject: [PATCH] Temp fix for the crashing side effect --- packages/compose/src/hooks/use-reduced-motion/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compose/src/hooks/use-reduced-motion/index.js b/packages/compose/src/hooks/use-reduced-motion/index.js index a8b4cf0569b841..8d7ffdfe9e221a 100644 --- a/packages/compose/src/hooks/use-reduced-motion/index.js +++ b/packages/compose/src/hooks/use-reduced-motion/index.js @@ -8,7 +8,7 @@ import useMediaQuery from '../use-media-query'; * * @type {boolean} */ -const IS_IE = window.navigator.userAgent.indexOf( 'Trident' ) >= 0; +const IS_IE = window.navigator.userAgent ? window.navigator.userAgent.indexOf( 'Trident' ) >= 0 : false; /** * Hook returning whether the user has a preference for reduced motion.