瀏覽代碼

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() {