minimize array allocations in the `where` filter (#6860)
Merge pull request 6860
This commit is contained in:
parent
7d759f0ff0
commit
33f59aef2c
|
@ -174,7 +174,7 @@ module Jekyll
|
||||||
return input unless input.respond_to?(:select)
|
return input unless input.respond_to?(:select)
|
||||||
input = input.values if input.is_a?(Hash)
|
input = input.values if input.is_a?(Hash)
|
||||||
input.select do |object|
|
input.select do |object|
|
||||||
Array(item_property(object, property)).map(&:to_s).include?(value.to_s)
|
Array(item_property(object, property)).map!(&:to_s).include?(value.to_s)
|
||||||
end || []
|
end || []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue