diff --git a/src/services/countdown.js b/src/services/countdown.js index a071b50..2c7c17d 100644 --- a/src/services/countdown.js +++ b/src/services/countdown.js @@ -36,7 +36,7 @@ class Countdown extends EventEmitter { } cancel () { - if (this.running && !this._ended) { + if (this._running && !this._ended) { this._cleanup() this._cancelled = true diff --git a/src/views/screens/capture.vue b/src/views/screens/capture.vue index e769017..b3aa4da 100644 --- a/src/views/screens/capture.vue +++ b/src/views/screens/capture.vue @@ -104,7 +104,7 @@ export default { this.countdown = null }) - this.countdown.on('done', () => { + this.countdown.on('cancelled', () => { console.log('cancelled') })