Move interval to from mounted to created

This commit is contained in:
Torjus Håkestad 2021-04-11 22:39:20 +02:00
parent 8a1bbdaa1c
commit a72bed5c62

View File

@ -119,7 +119,7 @@ export default class Home extends Vue {
}); });
} }
mounted(): void { created(): void {
this.updateStats(); this.updateStats();
this.updaterHandle = setInterval(() => { this.updaterHandle = setInterval(() => {
@ -127,7 +127,7 @@ export default class Home extends Vue {
}, 5000); }, 5000);
} }
unmounted(): void { beforeDestroy(): void {
clearInterval(this.updaterHandle); clearInterval(this.updaterHandle);
} }
} }