Parcourir la source

fix: Night mode toggle not working properly on first click

Owen Diffey il y a 3 ans
Parent
commit
1e0df7e6ce
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      frontend/src/components/layout/MainFooter.vue

+ 1 - 0
frontend/src/components/layout/MainFooter.vue

@@ -98,6 +98,7 @@ export default {
 	},
 	async mounted() {
 		this.localNightmode = JSON.parse(localStorage.getItem("nightmode"));
+		if (this.localNightmode === null) this.localNightmode = false;
 
 		this.frontendDomain = await lofig.get("frontendDomain");
 		this.siteSettings = await lofig.get("siteSettings");