Skip to content

Commit

Permalink
Expanded filter for team match history on history overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Nov 12, 2021
1 parent 8c6c0cf commit 982682e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion website/src/components/broadcast/TeamMatchHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export default {
matches() {
if (!this.team?.matches) return [];
return (this.team.matches || [])
.filter(m => m.id === this.match.id ? ([m.score_1, m.score_2].includes(m.first_to)) : true)
.filter(m => {
if (!m.event) return false;
if (this.match.week && m.week && this.match.week < m.week) return false; // no future matches?
if (m.id === this.match.id) return ([m.score_1, m.score_2].includes(m.first_to));
return true;
})
.sort(sortMatches) // in date order
.reverse() // reverse date order
.slice(0, this.max);
Expand Down

0 comments on commit 982682e

Please sign in to comment.