Pārlūkot izejas kodu

🐛: fix timer drop to negative if reset time is 0

master
Adrien pirms 6 gadiem
vecāks
revīzija
a7f468888b
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. +2
    -1
      src/components/Battleground/Timer.vue

+ 2
- 1
src/components/Battleground/Timer.vue Parādīt failu

@@ -18,9 +18,10 @@
startTimer: function () { startTimer: function () {
this.stopTimer() this.stopTimer()
this.timerIntervalId = setInterval(() => { this.timerIntervalId = setInterval(() => {
this.currentTime--
if (this.currentTime === 0) { if (this.currentTime === 0) {
this.stopTimer() this.stopTimer()
} else {
this.currentTime--
} }
}, 1000) }, 1000)
}, },


Notiek ielāde…
Atcelt
Saglabāt