From 2e64ea8f52a591197ed9e100dcb2b5e909b8137f Mon Sep 17 00:00:00 2001
From: 135e2 <135e2@135e2.tk>
Date: Sat, 13 Aug 2022 23:12:16 +0800
Subject: chore: simplify redundant code

Also changed || to ?? for better false/0/"" handling

Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
---
 src/App.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/App.vue')

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: {
-- 
cgit v1.2.3

