mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 09:18:11 -05:00
Sort will now raise error on nil object array input.
Sort will now throw an error when a nil object array is given as input. See issue #3491 for more information. Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
This commit is contained in:
@@ -222,6 +222,9 @@ module Jekyll
|
||||
#
|
||||
# Returns the filtered array of objects
|
||||
def sort(input, property = nil, nils = "first")
|
||||
if input.nil?
|
||||
raise ArgumentError.new("Invalid object array given. Object array is null.")
|
||||
end
|
||||
if property.nil?
|
||||
input.sort
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user