Move interval to from mounted to created
This commit is contained in:
		| @@ -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); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user