Fixed 500 when there is an invalid profile picture (#2109)

This commit is contained in:
Ahmad Farhat 2020-09-21 13:12:17 -04:00 committed by GitHub
parent f992f76ae1
commit 74ebb15dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
<div class="card card-profile h-100">
<div class="card-header bg-primary h-50"></div>
<div class="card-body text-center">
<% if current_user.image.blank? %>
<% if current_user.image.blank? || !valid_url?(current_user.image) %>
<span class="avatar avatar-xxxl card-profile-img bg-primary"><%= current_user.name.first %></span>
<% else %>
<%= image_tag(current_user.image, class: "avatar avatar-xxxl card-profile-img") %>