harden media
This commit is contained in:
@@ -33,7 +33,7 @@ export class LandingService {
|
||||
|
||||
const racesVm = new RacesPageViewModel(racesDto);
|
||||
|
||||
const topLeagues = leaguesDto.leagues.slice(0, 4).map(
|
||||
const topLeagues = (leaguesDto?.leagues || []).slice(0, 4).map(
|
||||
(league: LeagueWithCapacityDTO) => new LeagueCardViewModel({
|
||||
id: league.id,
|
||||
name: league.name,
|
||||
@@ -41,13 +41,14 @@ export class LandingService {
|
||||
}),
|
||||
);
|
||||
|
||||
const teams = teamsDto.teams.slice(0, 4).map(
|
||||
const teams = (teamsDto?.teams || []).slice(0, 4).map(
|
||||
(team: TeamListItemDTO) =>
|
||||
new TeamCardViewModel({
|
||||
id: team.id,
|
||||
name: team.name,
|
||||
tag: team.tag,
|
||||
description: team.description,
|
||||
logoUrl: team.logoUrl,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user