Skip to content

Commit

Permalink
switch to check gamemode
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Mar 23, 2024
1 parent 3e23580 commit 2ab8d4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/getGcData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ async function saveGcData(
// Steam is blocking this match for community prediction, so return error to prevent retry
return 'x-match-noretry';
}
if (!data || !data.match || !data.match.players || (!data.match.replay_salt && data.match.replay_state !== 'REPLAY_EXPIRED')) {
// Really old matches have a 0 replay salt so if the replay is expired it's a valid response
if (!data || !data.match || !data.match.players || (!data.match.replay_salt && data.match.game_mode !== 'DOTA_GAMEMODE_NONE')) {
// Really old matches have a 0 replay salt so if we don't have gamemode either it's a valid response
// Bad data but we can retry
throw new Error('invalid data');
}
Expand Down

0 comments on commit 2ab8d4d

Please sign in to comment.