Skip to content

Commit

Permalink
Use safe navigation when getting titles
Browse files Browse the repository at this point in the history
  • Loading branch information
anitagraham committed Oct 18, 2021
1 parent 821bfd9 commit 820b1b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/helpers/refinery/meta_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def page_title(options = {})
objects = (options[:chain_page_title] and object.respond_to?(:ancestors)) ? [object.ancestors, object] : [object]

objects.flatten.compact.each do |obj|
obj_title = obj.title if obj.title
obj_title = obj&.title.presence

# Only link when the object responds to a url method.
if options[:link] && obj.respond_to?(:url)
Expand Down
2 changes: 1 addition & 1 deletion images/app/views/refinery/admin/images/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@
<% end %>
<% content_for :stylesheets, stylesheet_link_tag('cropper') -%>
<% end %>
<% end %>

0 comments on commit 820b1b9

Please sign in to comment.