Reject nil entries in Site#read_things
This commit is contained in:
parent
d4bbe3c997
commit
bf9cf5340d
|
@ -193,8 +193,10 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_things(dir, magic_dir, klass)
|
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)
|
klass.new(self, self.source, dir, entry) if klass.valid?(entry)
|
||||||
|
end.reject do |entry|
|
||||||
|
entry.nil?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue