Skip to content

Commit 7212378

Browse files
committed
posts/notices/suggested_edit requires a guarantee that the user is not nil
1 parent 8b33e3c commit 7212378

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/posts/_expanded.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<%= render('posts/notices/flagged', post: post, user: current_user) %>
7676
<% end %>
7777

78-
<% if post.pending_suggested_edit? %>
78+
<% if post.pending_suggested_edit? && user_signed_in? %>
7979
<%= render('posts/notices/suggested_edit', post: post, user: current_user) %>
8080
<% end %>
8181

0 commit comments

Comments
 (0)