mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-23 16:26:15 -05:00
Properly clear timer in nextRequest
This commit is contained in:
parent
91f81460cb
commit
5bd2c87190
|
|
@ -256,7 +256,10 @@ class RoomBattleTimer {
|
|||
return true;
|
||||
}
|
||||
nextRequest() {
|
||||
if (this.timer) clearTimeout(this.timer);
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
if (!this.timerRequesters.size) return;
|
||||
const players = this.battle.players;
|
||||
if (players.some(player => player.secondsLeft <= 0)) return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user