volleyballsimtypes 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,8 @@ function transformToAttributes(season, leagueId) {
11
11
  iteration: season.iteration,
12
12
  league_id: leagueId,
13
13
  champion: season.champion != null ? season.champion.id : undefined,
14
- seasonTeams: season.teams.map(team_1.transformFromTeam),
15
- seasonMatches: season.matches.map(match_1.transformFromMatch)
14
+ seasonTeams: season.teams != null ? season.teams.map(team_1.transformFromTeam) : [],
15
+ seasonMatches: season.matches != null ? season.matches.map(match_1.transformFromMatch) : []
16
16
  };
17
17
  }
18
18
  exports.transformFromSeason = transformToAttributes;
@@ -13,7 +13,7 @@ function transformToAttributes(team) {
13
13
  coach_id: team.coach != null ? team.coach.id : undefined,
14
14
  country_id: team.country != null ? team.country.id : undefined,
15
15
  league_id: team.league != null ? team.league.id : undefined,
16
- coach: (0, coach_1.transformFromCoach)(team.coach)
16
+ coach: team.coach != null ? (0, coach_1.transformFromCoach)(team.coach) : undefined
17
17
  };
18
18
  }
19
19
  exports.transformFromTeam = transformToAttributes;
@@ -8,8 +8,8 @@ function transformToAttributes(season, leagueId) {
8
8
  iteration: season.iteration,
9
9
  league_id: leagueId,
10
10
  champion: season.champion != null ? season.champion.id : undefined,
11
- seasonTeams: season.teams.map(transformFromTeam),
12
- seasonMatches: season.matches.map(transformFromMatch)
11
+ seasonTeams: season.teams != null ? season.teams.map(transformFromTeam) : [],
12
+ seasonMatches: season.matches != null ? season.matches.map(transformFromMatch) : []
13
13
  };
14
14
  }
15
15
  function transformToObject(model) {
@@ -10,7 +10,7 @@ function transformToAttributes(team) {
10
10
  coach_id: team.coach != null ? team.coach.id : undefined,
11
11
  country_id: team.country != null ? team.country.id : undefined,
12
12
  league_id: team.league != null ? team.league.id : undefined,
13
- coach: transformFromCoach(team.coach)
13
+ coach: team.coach != null ? transformFromCoach(team.coach) : undefined
14
14
  };
15
15
  }
16
16
  function transformToObject(team) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",