Check slice bounds

This commit is contained in:
Eduard Urbach 2019-11-18 14:17:00 +09:00
parent a50a119e08
commit 597f46f372
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -62,7 +62,12 @@ func AnimeList(ctx aero.Context, user *arn.User, status string, sortBy string) e
allItems := statusLists[status].Items
// Slice the part that we need
items := allItems[index:]
var items []*arn.AnimeListItem
if index < len(allItems) {
items = allItems[index:]
}
maxLength := animeFirstLoad
if index > 0 {