diff --git a/src/views/components/dashboard/DashboardPriceChart2.vue b/src/views/components/dashboard/DashboardPriceChart2.vue
index ab3502d5..aaa05483 100644
--- a/src/views/components/dashboard/DashboardPriceChart2.vue
+++ b/src/views/components/dashboard/DashboardPriceChart2.vue
@@ -74,9 +74,9 @@
$
- {{ selectedTicker.converted_last.usd }}
+ {{ selectedTicker.converted_last.usd || '-' }}
- / {{ selectedTicker.target }}
+ / {{ selectedTicker.target || 'USDC' }}
@@ -346,7 +346,7 @@ export default {
]
},
color() {
- return this.colorMap(this.selectedTicker.trust_score)
+ return this.colorMap(this.selectedTicker?.trust_score)
},
homepage() {
if (this.coinInfo.links) {
@@ -382,9 +382,11 @@ export default {
this.$http.getCoinInfo().then(res => {
if (res) {
this.coinInfo = res
- this.tickers = res.tickers
- // eslint-disable-next-line prefer-destructuring
- this.selectedTicker = this.tickers[0]
+ if (res.tickers.lenght > 0) {
+ this.tickers = res.tickers
+ // eslint-disable-next-line prefer-destructuring
+ this.selectedTicker = this.tickers[0]
+ }
}
})
},