From a819b05303cbd02e4d5f5ecc74eff6e0fb3ed19c Mon Sep 17 00:00:00 2001 From: manel Date: Fri, 5 Jan 2024 14:41:09 +0100 Subject: [PATCH] Fix splice bug and removing automatic refreshing of tokens when component is created --- resources/js/Pages/Dashboard.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue index f578d6c..b25b297 100644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -223,7 +223,7 @@ BalancesChart }, props: { - tokens: Object, + tokens: Array, balance: Number, balances: Object, transactions: Array, @@ -234,7 +234,7 @@ } }, created() { - this.refreshTokens() + // this.refreshTokens() this.totals = { usd: this.balances.totals.at(-1), @@ -244,7 +244,7 @@ pricesEur: this.balances.prices_eur.at(-1) } - this.weeklyLast = this.tokens.splice(0, 7).at(-1) + this.weeklyLast = this.tokens.slice(0, 7).at(-1) }, methods: { getDailyChange(index) {