From ed3d4700697e4355a7ed7e6bcadcbc55e1afa4c6 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 7 Mar 2019 09:49:42 +0900 Subject: [PATCH] Fix #10202 (#10203) --- app/views/stream_entries/_poll.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/stream_entries/_poll.html.haml b/app/views/stream_entries/_poll.html.haml index c7e5e0c63f..dad04b79c8 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><