remove dangling pipe (|) w/o vote summary (#906)

This commit is contained in:
Alan Post 2020-08-19 17:20:09 -06:00 committed by GitHub
parent 142edb664e
commit 96dd6407b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -124,7 +124,9 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% if comment.flags > 0 &&
comment.show_score_to_user?(@user) &&
(comment.user_id == @user.try(:id) || @user.try("is_moderator?")) %>
| <%= comment.vote_summary_for_user(@user).downcase %>
<% if (s = comment.vote_summary_for_user(@user).downcase).present? %>
| <%= s %>
<% end %>
<% elsif comment.current_vote && comment.current_vote[:vote] == -1 %>
| -1
<%= Vote::ALL_COMMENT_REASONS[comment.current_vote[:reason]].downcase %>