From 88c164a8a778897e90b54d9b1991d5d3ab1a4956 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 13 Mar 2021 04:40:35 +0100 Subject: [PATCH] test fix --- src/hooks/useDarkMode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useDarkMode.js b/src/hooks/useDarkMode.js index 8bff3dd..c8cbb4e 100644 --- a/src/hooks/useDarkMode.js +++ b/src/hooks/useDarkMode.js @@ -39,7 +39,7 @@ export default function useDarkMode() { }, []) useEffect(() => { - if (!isClient) return + if (!isClient || process.env.NODE_ENV === 'test') return const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')