Skip to content

Commit

Permalink
feat: When no bracket key or bracket key 'match' take match bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLotU committed Aug 28, 2023
1 parent c265340 commit f8c56e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion website/src/components/broadcast/roots/BracketOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default {
if (this.broadcast?.bracket_key) key = this.broadcast.bracket_key;
if (this.bracketKey) key = this.bracketKey;
if ((!key || key === "match") && this.liveMatch) {
key = this.liveMatch.brackets[0].key;
}
if (!key) return this.event.brackets[0];
const bracket = this.event.brackets.find(b => b && b.key === key);
return bracket || this.event.brackets[0];
Expand All @@ -52,7 +56,8 @@ export default {
liveMatch() {
if (!this.broadcast?.live_match) return null;
return ReactiveRoot(this.broadcast.live_match[0], {
teams: ReactiveArray("teams")
teams: ReactiveArray("teams"),
brackets: ReactiveArray("brackets")
});
},
highlightMatch() {
Expand Down

0 comments on commit f8c56e2

Please sign in to comment.