From 1a19dbab698ce73a6c1e492e9c5f057ed92384b6 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 10 Aug 2023 18:38:48 -0300 Subject: [PATCH] Use dashes instead of 0 when no data is available on the GenericIndicator widget --- src/components/mini-widgets/GenericIndicator.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/mini-widgets/GenericIndicator.vue b/src/components/mini-widgets/GenericIndicator.vue index cbd21a26e..65b2ed419 100644 --- a/src/components/mini-widgets/GenericIndicator.vue +++ b/src/components/mini-widgets/GenericIndicator.vue @@ -106,7 +106,12 @@ onBeforeMount(() => { const store = useMainVehicleStore() const currentState = ref(0) -const parsedState = computed(() => round(Number(options.variableMultiplier) * Number(currentState.value))) +const parsedState = computed(() => { + if (currentState.value) { + return round(Number(options.variableMultiplier) * Number(currentState.value)).toString() + } + return '--' +}) const updateVariableState = (): void => { currentState.value = store.genericVariables[options.variableName as string]