Skip to content

Commit

Permalink
meta -> collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jez committed Jan 1, 2023
1 parent be7477f commit 3f64658
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/jekyll-feed/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def collections
end

@collections = normalize_posts_meta(@collections)
@collections.each_value do |meta|
normalize_categories(meta)
@collections.each_value do |collection|
normalize_categories(collection)
end

@collections
Expand Down Expand Up @@ -142,8 +142,8 @@ def normalize_posts_meta(hash)
hash
end

def normalize_categories(meta)
meta_categories = meta["categories"]
def normalize_categories(collection)
meta_categories = collection["categories"]
for_collection = case meta_categories
when Array
meta_categories
Expand All @@ -152,7 +152,7 @@ def normalize_categories(meta)
else
[]
end
meta["categories"] = for_collection.to_set
collection["categories"] = for_collection.to_set
end

def disabled_in_development?
Expand Down

0 comments on commit 3f64658

Please sign in to comment.