Merge pull request #2493 from jekyll/fix-sort
This commit is contained in:
commit
d359c63018
|
@ -207,9 +207,8 @@ module Jekyll
|
|||
when nils == "last"
|
||||
order = + 1
|
||||
else
|
||||
Jekyll.logger.error "Invalid nils order:",
|
||||
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'."
|
||||
exit(1)
|
||||
raise ArgumentError.new("Invalid nils order: " +
|
||||
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'.")
|
||||
end
|
||||
|
||||
input.sort { |apple, orange|
|
||||
|
@ -247,7 +246,9 @@ module Jekyll
|
|||
end
|
||||
|
||||
def item_property(item, property)
|
||||
if item.respond_to?(:data)
|
||||
if item.respond_to?(:to_liquid)
|
||||
item.to_liquid[property.to_s]
|
||||
elsif item.respond_to?(:data)
|
||||
item.data[property.to_s]
|
||||
else
|
||||
item[property.to_s]
|
||||
|
|
Loading…
Reference in New Issue