Skip to content

Commit

Permalink
fix handling of missing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 5, 2020
1 parent 6d3f3f2 commit 46179a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/claims/_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@
<h5>Updated</h5>
<%= l DateTime.parse(claim.updated), format: :medium %>
<% end %>
<% if claim.error_messages && claim.error_messages.first["status"].present? %>
<% if claim.error_messages.length > 0 && claim.error_messages.first["status"].present? %>
<h5>Error Status</h5>
<%= h(claim.error_messages.first["status"]) %>
<% end %>
<% if claim.error_messages && claim.error_messages.first["title"].present? %>
<% if claim.error_messages.length > 0 && claim.error_messages.first["title"].present? %>
<h5>Error Message</h5>
<%= h(claim.error_messages.first["title"]) %>
<% end %>
Expand Down

0 comments on commit 46179a3

Please sign in to comment.