瀏覽代碼

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

master
Adrien 3 年之前
父節點
當前提交
a7f468888b
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      src/components/Battleground/Timer.vue

+ 2
- 1
src/components/Battleground/Timer.vue 查看文件

@@ -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)
}, },


Loading…
取消
儲存