Skip to content

Commit 280fe10

Browse files
committed
Replace hardcoded 'theme' string with Darkify.storageKey constant
1 parent 19a9099 commit 280fe10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/darkify.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export class Darkify {
103103
}
104104

105105
#syncThemeBetweenTabs() {
106-
window.addEventListener('storage', (e) => {
107-
if (e.key === 'theme' && e.newValue) {
106+
window.addEventListener('storage', e => {
107+
if (e.key === Darkify.storageKey && e.newValue) {
108108
this.#theme.value = e.newValue;
109109
this.#createAttribute();
110110
}

0 commit comments

Comments
 (0)