mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 01:08:26 -05:00
Merge pull request #1796 from mojombo/fix-fetching-things
Reject nil entries in Site#read_things
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user