Merge pull request #1796 from mojombo/fix-fetching-things

Reject nil entries in Site#read_things
This commit is contained in:
Matt Rogers 2013-12-09 18:23:19 -08:00
commit ed82098162
1 changed files with 3 additions and 1 deletions

View File

@ -208,8 +208,10 @@ module Jekyll
end
def read_things(dir, magic_dir, klass)
things = get_entries(dir, magic_dir).map do |entry|
get_entries(dir, magic_dir).map do |entry|
klass.new(self, self.source, dir, entry) if klass.valid?(entry)
end.reject do |entry|
entry.nil?
end
end