mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
where filter uses array for everything
This commit is contained in:
@@ -222,7 +222,7 @@ module Jekyll
|
||||
def where(input, property, value)
|
||||
return input unless input.is_a?(Enumerable)
|
||||
input = input.values if input.is_a?(Hash)
|
||||
input.select { |object| item_property(object, property).to_s == value.to_s or item_property(object, property).include? value.to_s }
|
||||
input.select { |object| Array(item_property(object, property)).map(&:to_s).include?(value.to_s) }
|
||||
end
|
||||
|
||||
# Sort an array of objects
|
||||
|
||||
Reference in New Issue
Block a user