diff --git a/src/views/dashboard/graphs/Card.vue b/src/views/dashboard/graphs/Card.vue index 234f8b9a..cfe37f65 100644 --- a/src/views/dashboard/graphs/Card.vue +++ b/src/views/dashboard/graphs/Card.vue @@ -23,7 +23,7 @@ limitations under the License. --> }" > {{ singleVal.toFixed(2) }} - + {{ decodeURIComponent(unit) }} @@ -55,7 +55,9 @@ const metricConfig = computed(() => props.config.metricConfig || []); const key = computed(() => Object.keys(props.data)[0]); const singleVal = computed(() => Number(props.data[key.value])); const unit = computed( - () => metricConfig.value[0] && encodeURIComponent(metricConfig.value[0].unit) + () => + metricConfig.value[0] && + encodeURIComponent(metricConfig.value[0].unit || "") );