Parcourir la source

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

任一存 il y a 2 ans
Parent
commit
5882b9e28f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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() {