diff --git a/src/runtime/plugin.client.ts b/src/runtime/plugin.client.ts index 5ca52ff9..be4544e1 100644 --- a/src/runtime/plugin.client.ts +++ b/src/runtime/plugin.client.ts @@ -57,7 +57,7 @@ export default defineNuxtPlugin((nuxtApp) => { function watchStorageChange () { window.addEventListener('storage', (e) => { - if (e.key === storageKey) { + if (e.key === storageKey && e.newValue && colorMode.preference !== e.newValue) { colorMode.preference = e.newValue } })