Update src/platform/web/Platform.js

Co-authored-by: Bruno Windels <274386+bwindels@users.noreply.github.com>
This commit is contained in:
R Midhun Suresh 2022-05-12 12:48:41 +05:30 committed by GitHub
parent d5bc9f5d7d
commit 4231037345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;