Skip to content

Commit 5678042

Browse files
committed
fix: color mode service always detecting dark mode
We weren't reading the `matches` property from `matchMedia` which meant that the condition is always true.
1 parent 0079a41 commit 5678042

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

report-app/src/app/services/app-color-mode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class AppColorMode {
2020
} catch {}
2121

2222
if (!colorMode) {
23-
colorMode = matchMedia('(prefers-color-scheme: dark)') ? 'dark' : 'light';
23+
colorMode = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
2424
}
2525

2626
this.setColorMode(colorMode);

0 commit comments

Comments
 (0)