diff --git a/app/views/shared/_feed_message.html.slim b/app/views/shared/_feed_message.html.slim
index 3060ce0d7..5a5b8389c 100644
--- a/app/views/shared/_feed_message.html.slim
+++ b/app/views/shared/_feed_message.html.slim
@@ -1,4 +1,4 @@
--if !presenter.is_reference_to_issue && policy(presenter.reference_project).show?
+-if presenter.is_reference_to_issue.nil? || presenter.reference_project.nil? || policy(presenter.reference_project).show?
.panel.panel-default[ id = (presenter.comment_id? ? presenter.comment_anchor : '') ]
.panel-body
.pull-left.roffset5