소스 검색

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

任一存 2 년 전
부모
커밋
5882b9e28f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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() {