forked from mystiq/hydrogen-web
Update src/platform/web/Platform.js
Co-authored-by: Bruno Windels <274386+bwindels@users.noreply.github.com>
This commit is contained in:
parent
cc88245933
commit
d5bc9f5d7d
1 changed files with 1 additions and 1 deletions
|
@ -317,7 +317,7 @@ export class Platform {
|
|||
}
|
||||
|
||||
get preferredColorScheme() {
|
||||
if (window.matchMedia("(prefers-color-scheme: dark)")) {
|
||||
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||
return COLOR_SCHEME_PREFERENCE.DARK;
|
||||
} else if (window.matchMedia("(prefers-color-scheme: light)")) {
|
||||
return COLOR_SCHEME_PREFERENCE.LIGHT;
|
||||
|
|
Loading…
Reference in a new issue