mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-08 18:48:18 +01:00
Update src/platform/web/Platform.js
Co-authored-by: Bruno Windels <274386+bwindels@users.noreply.github.com>
This commit is contained in:
parent
d5bc9f5d7d
commit
4231037345
@ -319,7 +319,7 @@ export class Platform {
|
|||||||
get preferredColorScheme() {
|
get preferredColorScheme() {
|
||||||
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||||
return COLOR_SCHEME_PREFERENCE.DARK;
|
return COLOR_SCHEME_PREFERENCE.DARK;
|
||||||
} else if (window.matchMedia("(prefers-color-scheme: light)")) {
|
} else if (window.matchMedia("(prefers-color-scheme: light)").matches) {
|
||||||
return COLOR_SCHEME_PREFERENCE.LIGHT;
|
return COLOR_SCHEME_PREFERENCE.LIGHT;
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user