Revert memoizing Site#docs_to_write and #documents (#7684)
Merge pull request 7684
This commit is contained in:
parent
263d41f0f7
commit
554e07d4a5
|
@ -326,15 +326,15 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns an Array of Documents which should be written
|
# Returns an Array of Documents which should be written
|
||||||
def docs_to_write
|
def docs_to_write
|
||||||
@docs_to_write ||= documents.select(&:write?)
|
documents.select(&:write?)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get all the documents
|
# Get all the documents
|
||||||
#
|
#
|
||||||
# Returns an Array of all Documents
|
# Returns an Array of all Documents
|
||||||
def documents
|
def documents
|
||||||
@documents ||= collections.reduce(Set.new) do |docs, (_, collection)|
|
collections.each_with_object(Set.new) do |(_, collection), set|
|
||||||
docs + collection.docs + collection.files
|
set.merge(collection.docs).merge(collection.files)
|
||||||
end.to_a
|
end.to_a
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue