Explorar o código

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

任一存 %!s(int64=2) %!d(string=hai) anos
pai
achega
5882b9e28f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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() {