ref: c39ac5738d5841c2fbcdeaa637182b918be22667
parent: 9da617912ba740cebd18789ca7aa55f25495ae6c
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Jul 19 08:20:01 EDT 2018
Revert "hugolib: Fix potential server panic with drafts/future enabled" This had a side-effect. I have understand this better to apply the correct fix. Will come soon. This reverts commit 1ab4658c0d5ea2927f04bd748206e5b139a6326e.
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -1511,18 +1511,11 @@
spc = newPageCache()
- initPage := func(p *Page) {
+ for _, p := range s.rawAllPages {
p.subSections = Pages{}
p.parent = nil
p.scratch = maps.NewScratch()
p.mainPageOutput = nil
- }
-
- for _, p := range s.Pages {
- initPage(p)
- }
- for _, p := range s.headlessPages {
- initPage(p)
}
}