Skip to content

Commit 64bc94d

Browse files
committed
fix: fixed dark theme toggle in webpack
1 parent f608a1e commit 64bc94d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/views/settings/Theme.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export default {
3636
// Apply newly set theme
3737
// Create Dark Theme Element
3838
const themeLink = document.createElement('link');
39-
themeLink.href = '/static/dark.css';
39+
themeLink.href = '/dark.css';
4040
themeLink.rel = 'stylesheet';
4141
// Append Dark Theme Element If Selected Mode Is Dark
4242
value === 'dark'
4343
? document.querySelector('head').appendChild(themeLink)
44-
: document.querySelector('link[href="/static/dark.css"]').remove();
44+
: document.querySelector(`link[href="${themeLink.href}"]`).remove();
4545
},
4646
},
4747
},

0 commit comments

Comments
 (0)