Check slice bounds
This commit is contained in:
parent
a50a119e08
commit
597f46f372
@ -62,7 +62,12 @@ func AnimeList(ctx aero.Context, user *arn.User, status string, sortBy string) e
|
|||||||
allItems := statusLists[status].Items
|
allItems := statusLists[status].Items
|
||||||
|
|
||||||
// Slice the part that we need
|
// Slice the part that we need
|
||||||
items := allItems[index:]
|
var items []*arn.AnimeListItem
|
||||||
|
|
||||||
|
if index < len(allItems) {
|
||||||
|
items = allItems[index:]
|
||||||
|
}
|
||||||
|
|
||||||
maxLength := animeFirstLoad
|
maxLength := animeFirstLoad
|
||||||
|
|
||||||
if index > 0 {
|
if index > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user