don't try to render a name if the deleter is nil

This commit is contained in:
byte[] 2019-12-17 01:58:27 -05:00
parent fee56de1d7
commit 7b1a98291b
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ article.block.communication id="comment_#{@comment.id}"
strong.comment_deleted
' Deletion reason:
=<> @comment.deletion_reason
= if can?(@conn, :hide, @comment) do
= if can?(@conn, :hide, @comment) and not is_nil(@comment.deleted_by) do
| (
= @comment.deleted_by.name
| )

View file

@ -11,7 +11,7 @@ article.block.communication id="post_#{@post.id}"
strong.comment_deleted
' Deletion reason:
=> @post.deletion_reason
= if can?(@conn, :hide, @post) do
= if can?(@conn, :hide, @post) and not is_nil(@post.deleted_by) do
| (
= @post.deleted_by.name
| )