Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Fix undefined modes
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Aug 6, 2020
1 parent af24e25 commit c09fe79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bumbag/src/ColorMode/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function addColorModeBodyClassName(nextMode: string, prevMode?: string) {
}

export function getDefaultColorMode(mode, { localStorage, theme }) {
const { useSystemColorMode } = theme.modes;
const { useSystemColorMode } = theme.modes || {};
let defaultMode = mode;
if (typeof window !== 'undefined') {
if (useSystemColorMode && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
Expand Down

0 comments on commit c09fe79

Please sign in to comment.