theme-switch: Improve theme switch logic (#86)
- removes unnecessary local-storage item removal - less inline script on build - assumes `defaultTheme as auto when value is not `dark` or `light` - should work according to table at docs
This commit is contained in:
parent
678b5d82fc
commit
b301d60f03
2 changed files with 16 additions and 16 deletions
|
|
@ -64,11 +64,5 @@
|
|||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
{{- else -}}
|
||||
{{/* case where owner disables theme button after deployment, this resets the stored theme */}}
|
||||
<script>
|
||||
localStorage.removeItem("pref-theme");
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue