about summary refs log tree commit diff
path: root/app/views/stream_entries
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-07 13:45:43 +0100
committerGitHub <noreply@github.com>2019-03-07 13:45:43 +0100
commit38e9c66f34d7054357a3de63834f182734d43d75 (patch)
tree0f46795c03e883893ce01170a969f51189505d32 /app/views/stream_entries
parent84c807a0dcdfd6c3c18ee37fcb5003a92a92ce3f (diff)
parent9c5e7805ccfc9b065aba7831f912287e02aeb1bb (diff)
Merge pull request #944 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/stream_entries')
-rw-r--r--app/views/stream_entries/_poll.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/stream_entries/_poll.html.haml b/app/views/stream_entries/_poll.html.haml
index c7e5e0c63..dad04b79c 100644
--- a/app/views/stream_entries/_poll.html.haml
+++ b/app/views/stream_entries/_poll.html.haml
@@ -7,7 +7,7 @@
     - options.each do |option|
       %li
         - if show_results
-          - percent = 100 * option.votes_count / poll.votes_count
+          - percent = poll.votes_count > 0 ? 100 * option.votes_count / poll.votes_count : 0
           %span.poll__chart{ style: "width: #{percent}%" }
 
           %label.poll__text><