Skip to content

Commit

Permalink
Fix showing old match
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Jan 21, 2021
1 parent 5bc7815 commit f03c21c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dashboard/production/currentmatch/currentmatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ const DashCurrentMatch: React.FC = () => {
// -1: Error, 0: Start, 1: "Middle", 2: End, 3: Only game
let startOrEnd = 1;
if (currentMatchIndex === -1) {
startOrEnd = -1;
if (matchesRep.length !== 0) {
nodecg.sendMessage('nextMatch');
startOrEnd = -1;
}
} else if (matchesRep.length === 1) {
startOrEnd = 3;
} else if (currentMatchIndex === 0) {
Expand Down Expand Up @@ -136,6 +139,8 @@ const DashCurrentMatch: React.FC = () => {
(document.getElementById(`${i}AOT-Score`) as HTMLInputElement).value = '';
(document.getElementById(`${i}BOT-Score`) as HTMLInputElement).value = '';
}

(document.getElementById(`${i}-Complete`) as HTMLInputElement).checked = mapScores.complete;
} catch (error) {
console.log(
'This error is from the current matches dashboard.\nIf it is complaining about .value being null then that is ok.\nIf not then that is not ok :). Err => ',
Expand Down

0 comments on commit f03c21c

Please sign in to comment.