Skip to content

Commit

Permalink
handling instance when category might be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleypliu committed Aug 18, 2020
1 parent ca61e85 commit f4980c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/comfy_patching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def import_page(path, parent)
fragments_attributes.select { |attr| attr[:tag] == 'categories'}.each do |cat|
cat[:content].split(' ').each do |label|
category = Comfy::Cms::PageCategory.where(label: label).first
new_categories << category
new_categories << category unless category.nil?
end
end

Expand Down

0 comments on commit f4980c8

Please sign in to comment.