Browse Source

no message

xingzai 2 years ago
parent
commit
f8ea5b1f21
1 changed files with 3 additions and 0 deletions
  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