diff --git a/src/App.vue b/src/App.vue index 2c2c3fe..a8bd6ed 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,15 +33,15 @@ export default { }, mounted() { this.init() - - setInterval(() => { - if (this.paused === false) { - this.time() - } - }, 40000) + setInterval(this.loop, 40000) }, methods: { ...mapActions(usePlayer, ['init', 'time']), + loop() { + if (this.paused === false) { + this.time() + } + }, }, }