diff --git a/src/components/poll/poll_status/poll_status.vue b/src/components/poll/poll_status/poll_status.vue index 8c718262..dd0a2b17 100644 --- a/src/components/poll/poll_status/poll_status.vue +++ b/src/components/poll/poll_status/poll_status.vue @@ -32,7 +32,11 @@ export default { }, methods: { percentageForOption: function (count) { - return count / this.totalVotesCount * 100 + if (this.totalVotesCount === 0) { + return 0 + } + + return (count / this.totalVotesCount * 100).toFixed(1) } } }