We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 615c8a8 commit 26495cfCopy full SHA for 26495cf
src/PreferredColorScheme.ts
@@ -27,13 +27,13 @@ export function usePreferredColorScheme() {
27
28
onMounted(() => {
29
Object.values(themesObj).forEach(theme => {
30
- theme.addEventListener('change', handler);
+ theme.addListener(handler);
31
});
32
33
34
onUnmounted(() => {
35
Object.values(themesObj).forEach(themeMedia => {
36
- themeMedia.removeEventListener('change', handler);
+ themeMedia.removeListener(handler);
37
38
39
0 commit comments