Skip to content

Commit 4613280

Browse files
committed
Fixed bug preventing statistics to load when no legs exist
1 parent 25da812 commit 4613280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

data/statistics_x01.go

+3
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ func GetX01HistoryForPlayer(id int, limit int, matchType int) ([]*models.Leg, er
511511
legIDs = append(legIDs, s.LegID)
512512
}
513513

514+
if len(legIDs) == 0 {
515+
return []*models.Leg{}, nil
516+
}
514517
legs, err := GetLegs(legIDs)
515518
if err != nil {
516519
return nil, err

0 commit comments

Comments
 (0)