Skip to content

Commit 19231d0

Browse files
committed
Correctly calculate next yellow card due
1 parent b97f568 commit 19231d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/team/TeamYellowCardNextDue.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
},
2626
latestCardTime() {
2727
if (this.activeYellowCards.length > 0) {
28-
return this.activeYellowCards[0].timeRemaining;
28+
let cards = [];
29+
for (let card of this.activeYellowCards) {
30+
cards.push(card.timeRemaining)
31+
}
32+
cards.sort()
33+
return cards[0];
2934
}
3035
return 0;
3136
},

0 commit comments

Comments
 (0)