Skip to content

Commit

Permalink
Fixed bug preventing statistics to load when no legs exist
Browse files Browse the repository at this point in the history
  • Loading branch information
thordy committed Mar 8, 2024
1 parent 25da812 commit 4613280
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/statistics_x01.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ func GetX01HistoryForPlayer(id int, limit int, matchType int) ([]*models.Leg, er
legIDs = append(legIDs, s.LegID)
}

if len(legIDs) == 0 {
return []*models.Leg{}, nil
}
legs, err := GetLegs(legIDs)
if err != nil {
return nil, err
Expand Down

0 comments on commit 4613280

Please sign in to comment.