Skip to content

Commit

Permalink
Ensure content item has links
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Baker committed Feb 12, 2019
1 parent e600c6b commit 876edc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/content_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def set_guide_draft_access_token
def load_content_item
content_item = Services.content_store.content_item(content_item_path)

if related_links_variant.variant?('B')
if related_links_variant.variant?('B') && content_item.dig('links')
content_item['links']['ordered_related_items'] = content_item['links'].fetch('suggested_ordered_related_items', [])
end

Expand Down

0 comments on commit 876edc4

Please sign in to comment.