diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/App.vue | 6 | ||||
-rw-r--r-- | src/components/EditPage.vue | 2 | ||||
-rw-r--r-- | src/components/SettingsPage.vue | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue index 434845a..e5e7f38 100644 --- a/src/App.vue +++ b/src/App.vue @@ -120,9 +120,9 @@ export default { }, mounted() { - let backgroundImageURL = - JSON.parse(localStorage.getItem("backgroundImageURL")) || ""; - this.updateBackgroundImageURL(backgroundImageURL); + this.updateBackgroundImageURL( + JSON.parse(localStorage.getItem("backgroundImageURL")) + ); }, methods: { diff --git a/src/components/EditPage.vue b/src/components/EditPage.vue index 84548cd..0f3ae9d 100644 --- a/src/components/EditPage.vue +++ b/src/components/EditPage.vue @@ -168,7 +168,7 @@ export default { // LocalStorage loadFromLS() { - this.LSData = JSON.parse(localStorage.getItem("LSData")) || this.LSData; + this.LSData = JSON.parse(localStorage.getItem("LSData")) ?? this.LSData; }, writeToLS() { localStorage.setItem("LSData", JSON.stringify(this.LSData)); diff --git a/src/components/SettingsPage.vue b/src/components/SettingsPage.vue index 79a92fe..ebd4473 100644 --- a/src/components/SettingsPage.vue +++ b/src/components/SettingsPage.vue @@ -123,7 +123,7 @@ export default { // LocalStorage loadFromLS() { this.backgroundImageURL = - JSON.parse(localStorage.getItem("backgroundImageURL")) || + JSON.parse(localStorage.getItem("backgroundImageURL")) ?? this.backgroundImageURL; }, writeToLS() { |