set only interval, when not exists, fix #31

This commit is contained in:
Jonathan Baecker 2020-09-15 10:26:47 +02:00
parent 20a00c3f8a
commit 349fcbe529

View File

@ -232,7 +232,7 @@ export default {
}
this.stat = response.data
if (process.browser) {
if (process.browser && !this.interval) {
this.interval = setInterval(async () => {
const response = await this.$axios.get('api/player/stats/?stats=all')
this.stat = response.data