Handle division by zero

This commit is contained in:
D. Berge
2020-08-29 12:52:29 +02:00
parent 71e0326141
commit a9247c691c

View File

@@ -98,13 +98,17 @@
</v-list-item-subtitle>
</v-list-item>
<v-list-item>
<v-list-item v-if="projectInfo.prime">
<v-list-item-title class="">
Of which prime
</v-list-item-title>
<v-list-item-subtitle class="text-right">
<span>
({{ ((1 - projectInfo.other / projectInfo.prime)*100).toFixed(1) }}%) {{projectInfo.prime}}
({{
projectInfo.prime
? ((1 - projectInfo.other / projectInfo.prime)*100).toFixed(1)
: "0.0"
}}%) {{projectInfo.prime}}
</span>
</v-list-item-subtitle>
</v-list-item>