diff --git a/src/app/components/HomePage/Masthead.tsx b/src/app/components/HomePage/Masthead.tsx index 668dd7dc..b01e51ee 100644 --- a/src/app/components/HomePage/Masthead.tsx +++ b/src/app/components/HomePage/Masthead.tsx @@ -19,7 +19,7 @@ export function Masthead() { > React Boilerplate {' '} - as{' '} + as a{' '} ) : error ? ( - There is an error occurred! + Oops! An error has occurred ) : null} ); diff --git a/src/styles/theme/utils.ts b/src/styles/theme/utils.ts index 9614052e..f087ad5e 100644 --- a/src/styles/theme/utils.ts +++ b/src/styles/theme/utils.ts @@ -1,7 +1,8 @@ import { ThemeKeyType } from './types'; -export const isSysyemDark = window.matchMedia('(prefers-color-scheme: dark)') - .matches; +export const isSysyemDark = window.matchMedia + ? window.matchMedia('(prefers-color-scheme: dark)')?.matches + : undefined; export function saveTheme(theme: ThemeKeyType) { if (window.localStorage) {