about summary refs log tree commit diff
path: root/app/views/stream_entries
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2019-03-07 09:49:42 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-03-07 01:49:42 +0100
commitf44091d6535463e08a90dbf3d108540bf587cec1 (patch)
tree2a11e0b0c815f65aa684027234740b97ae0b10c0 /app/views/stream_entries
parent96f905f40913b915496039d188297a7949b1a6db (diff)
Fix #10202 (#10203)
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><