mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
fix: wrap theme provider in self-invoking function
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
---
|
||||
|
||||
<script is:inline>
|
||||
(function () {
|
||||
const getThemePreference = () => {
|
||||
if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) {
|
||||
return localStorage.getItem('theme');
|
||||
@@ -23,4 +24,5 @@
|
||||
attributeFilter: ['class'],
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user