Reject nil entries in Site#read_things

This commit is contained in:
Parker Moore 2013-12-09 12:46:57 -05:00
parent d4bbe3c997
commit bf9cf5340d
1 changed files with 3 additions and 1 deletions

View File

@ -193,8 +193,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