Move interval to from mounted to created
This commit is contained in:
parent
8a1bbdaa1c
commit
a72bed5c62
@ -119,7 +119,7 @@ export default class Home extends Vue {
|
||||
});
|
||||
}
|
||||
|
||||
mounted(): void {
|
||||
created(): void {
|
||||
this.updateStats();
|
||||
|
||||
this.updaterHandle = setInterval(() => {
|
||||
@ -127,7 +127,7 @@ export default class Home extends Vue {
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
unmounted(): void {
|
||||
beforeDestroy(): void {
|
||||
clearInterval(this.updaterHandle);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user