xingzai 2 rokov pred
rodič
commit
f8ea5b1f21
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      controllers/search.go

+ 3 - 0
controllers/search.go

@@ -428,6 +428,9 @@ func (this *SearchController) ListHomeArtAndChart() {
 		chartList[k].IsNeedJump = true
 		chartList[k].Source = 2
 	}
+	if len(chartList) == 0 {
+		chartList = make([]*models.HomeChartListResp, 0)
+	}
 	resp.ChartList = chartList
 	var result []*models.SearchItem
 	var total int64