Les pénalités ne se suivent pas d'une tentative à une autre
This commit is contained in:
@ -101,7 +101,7 @@ export default function GameProvider({ children }: { children: ReactNode }) {
|
||||
const activeChallenge: ChallengeAction | undefined = challengeActions
|
||||
.find(challengeAction => challengeAction.penaltyStart && challengeAction.penaltyEnd
|
||||
&& challengeAction.penaltyStart <= now && now <= challengeAction.penaltyEnd)
|
||||
if (!activeChallenge || !game.currentRunner)
|
||||
if (!activeChallenge || !game.currentRunner || game.runId !== activeChallenge.runId)
|
||||
updatePenalty({ penaltyStart: null, penaltyEnd: null })
|
||||
else if (activeChallenge && (activeChallenge.penaltyStart !== game.penaltyStart || activeChallenge.penaltyEnd)) {
|
||||
updatePenalty({ penaltyStart: activeChallenge.penaltyStart, penaltyEnd: activeChallenge.penaltyEnd })
|
||||
|
Reference in New Issue
Block a user