From 5c3768034d5a6b1774852dc4967f88bd55f9ba41 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 1 Sep 2023 11:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mainline/model_mainline.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mainline/model_mainline.go b/modules/mainline/model_mainline.go index d693e4ade..6ee1b1626 100644 --- a/modules/mainline/model_mainline.go +++ b/modules/mainline/model_mainline.go @@ -171,6 +171,9 @@ func (this *ModelMline) randomboos(data *pb.DBMainline) (err error) { for k, _ := range data.Chapteraward { chapters = append(chapters, k) } + if len(chapters) == 0 { + return + } for _, v := range chapters { if conf, err = this.module.configure.GetMainChapterConf(v); err != nil { return