fix nil pointer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jay 2021-02-22 11:03:17 +08:00
parent 01c9402eac
commit 08e0607a88

View File

@ -103,6 +103,9 @@ func hasChannel(id string, c *context.Context) *model.TwitchChannel {
fmt.Println("channels :: ", chs) fmt.Println("channels :: ", chs)
for _, v := range chs { for _, v := range chs {
if v == nil {
continue
}
if v.ID == id { if v.ID == id {
return v return v
} }