Skip to content

Commit

Permalink
fix: fixed dark theme toggle in webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed May 3, 2024
1 parent f608a1e commit 64bc94d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/settings/Theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export default {
// Apply newly set theme
// Create Dark Theme Element
const themeLink = document.createElement('link');
themeLink.href = '/static/dark.css';
themeLink.href = '/dark.css';
themeLink.rel = 'stylesheet';
// Append Dark Theme Element If Selected Mode Is Dark
value === 'dark'
? document.querySelector('head').appendChild(themeLink)
: document.querySelector('link[href="/static/dark.css"]').remove();
: document.querySelector(`link[href="${themeLink.href}"]`).remove();
},
},
},
Expand Down

0 comments on commit 64bc94d

Please sign in to comment.