Skip to content

Commit

Permalink
fix error loading certain league settings (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 committed Jul 9, 2021
1 parent b131069 commit d9fd5e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/leagueHelper.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export function mapStandings(ts) {

export function mapSettings(settings) {
settings.stat_categories = settings.stat_categories.stats.map((s) => {
s.stat.stat_position_types = s.stat.stat_position_types.map(
(pt) => pt.stat_position_type.position_type
);
s.stat.stat_position_types = s.stat.stat_position_types
? s.stat.stat_position_types.map((pt) => pt.stat_position_type.position_type)
: [];

return s.stat;
});
Expand Down

0 comments on commit d9fd5e6

Please sign in to comment.