Skip to content

Commit

Permalink
Merge pull request #35 from calluswhatyouwant/player-requests
Browse files Browse the repository at this point in the history
Update PlayHistory model
  • Loading branch information
JoseRenan authored Dec 24, 2018
2 parents 0420354 + 454922f commit 9e7dd97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/models/player/play-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class PlayHistory {

playedAt: string; // Timestamp

context: Context;
context: Context | null;

constructor(json: any) {
this.track = new Track(json.track);
this.playedAt = json.added_at;
this.context = new Context(json.context);
this.playedAt = json.played_at;
this.context = json.context ? new Context(json.context) : null;
}
}

Expand Down

0 comments on commit 9e7dd97

Please sign in to comment.