From a72bed5c62fe3394a19e822eae3af473ca618d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 11 Apr 2021 22:39:20 +0200 Subject: [PATCH] Move interval to from mounted to created --- web/frontend/src/components/Home.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/frontend/src/components/Home.vue b/web/frontend/src/components/Home.vue index 5842453..7394e8f 100644 --- a/web/frontend/src/components/Home.vue +++ b/web/frontend/src/components/Home.vue @@ -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); } }