Skip to content

Commit

Permalink
Fixed reading of files
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Mar 15, 2021
1 parent f478c73 commit 3d706a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extension/team-import-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ function updateTeamPreset(newVal: Asset[]): void {
try {
const teamsJSON = JSON.parse(jsonString);
if (teamsJSON.teams) {
teamsJSON.teams.forEach((team: TeamMeta) => {
Object.values<TeamMeta>(teamsJSON.teams).forEach((team: TeamMeta) => {
newTeamPresets.teams[team.name] = team;
});
}

if (teamsJSON.players) {
teamsJSON.players.forEach((player: Player) => {
Object.values<Player>(teamsJSON.players).forEach((player: Player) => {
newTeamPresets.players[player.steamId] = player;
});
}
Expand Down

0 comments on commit 3d706a7

Please sign in to comment.