Skip to content

Commit

Permalink
theme: add additional check around matchMedia call
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Aug 15, 2024
1 parent 1a771a2 commit 55bfcc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function remove_theme() {

export function init_theme() {

if (window.matchMedia) {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').addEventListener) {

window.matchMedia('(prefers-color-scheme: dark)')
/*
Expand Down

0 comments on commit 55bfcc5

Please sign in to comment.