Skip to content

Commit

Permalink
Use dashes instead of 0 when no data is available on the GenericIndic…
Browse files Browse the repository at this point in the history
…ator widget
  • Loading branch information
rafaellehmkuhl committed Aug 10, 2023
1 parent 4cd3bd1 commit 1a19dba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/mini-widgets/GenericIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ onBeforeMount(() => {
const store = useMainVehicleStore()
const currentState = ref<unknown>(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]
Expand Down

0 comments on commit 1a19dba

Please sign in to comment.