summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-07-19 12:20:01 +0200
committerBjørn Erik Pedersen <[email protected]>2018-07-19 12:20:01 +0200
commitc39ac5738d5841c2fbcdeaa637182b918be22667 (patch)
treef1290dd81202d776e3f50115a94fb6e822e74123
parent9da617912ba740cebd18789ca7aa55f25495ae6c (diff)
downloadhugo-c39ac5738d5841c2fbcdeaa637182b918be22667.tar.gz
hugo-c39ac5738d5841c2fbcdeaa637182b918be22667.zip
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.
-rw-r--r--hugolib/site.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index b4607387f..42e429e67 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -1511,19 +1511,12 @@ func (s *Site) resetBuildState() {
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)
- }
}
func (s *Site) kindFromSections(sections []string) string {