diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 8346962e06..12bb56a874 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -175,7 +175,7 @@ export async function common(createVue: () => App) { defaultStore.set('darkMode', isDeviceDarkmode()); } - window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => { + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (mql) => { if (ColdDeviceStorage.get('syncDeviceDarkMode')) { defaultStore.set('darkMode', mql.matches); }