Forráskód Böngészése

bug fix:四维看看热点列表初始值逻辑

任一存 2 éve
szülő
commit
5882b9e28f
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/components/HotspotList.vue

+ 1 - 1
src/components/HotspotList.vue

@@ -99,7 +99,7 @@ export default {
     },
   },
   mounted() {
-    this.historyList = JSON.parse(localStorage.getItem('hotspot-search-history'))
+    this.historyList = JSON.parse(localStorage.getItem('hotspot-search-history')) || []
     this.onClickSearch()
   },
   destroyed() {