From f44091d6535463e08a90dbf3d108540bf587cec1 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 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><