Skip to content

Commit

Permalink
Fix a plainToClass bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Sep 27, 2021
1 parent e58934a commit 5c9ec8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/main.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class Store {
});
console.log(r.data);
for (const team of r.data.records) {
teams[team.id!] = plainToClass(Team, team);
teams[team.id!] = team;
}
while (r.data.navigation.prevPageToken) {
await localforage.setItem(
Expand All @@ -128,7 +128,7 @@ export class Store {
});
console.log(r.data);
for (const team of r.data.records) {
teams[team.id] = plainToClass(Team, team);
teams[team.id] = team;
}
await localforage.setItem('teams', teams);
}
Expand All @@ -141,7 +141,7 @@ export class Store {
}
}
}
this.existingTeams = existingTeams;
this.existingTeams = plainToClass(Team, existingTeams);
}

async createTeam(teamName: string) {
Expand Down

0 comments on commit 5c9ec8a

Please sign in to comment.