Skip to content

Commit

Permalink
Use a default icon for avatar loading error
Browse files Browse the repository at this point in the history
Fixes #6183
  • Loading branch information
dmarcoux committed Dec 12, 2018
1 parent a030960 commit ff892c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/app/views/webui2/webui/comment/_content.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
- if level > 3
- comment.children.each do |children|
= render partial: 'webui2/webui/comment/content', locals: { comment: children, commentable: commentable, level: level + 1 }

:javascript
$('#comments img').one('error', function(){
$(this).after('<i class="fas fa-user-circle fa-2x ' + $(this).attr('class') + '"></i>');
$(this).remove();
});

0 comments on commit ff892c6

Please sign in to comment.