mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
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 1ab4658c0d
.
This commit is contained in:
parent
9da617912b
commit
c39ac5738d
1 changed files with 1 additions and 8 deletions
|
@ -1511,19 +1511,12 @@ func (s *Site) resetBuildState() {
|
||||||
|
|
||||||
spc = newPageCache()
|
spc = newPageCache()
|
||||||
|
|
||||||
initPage := func(p *Page) {
|
for _, p := range s.rawAllPages {
|
||||||
p.subSections = Pages{}
|
p.subSections = Pages{}
|
||||||
p.parent = nil
|
p.parent = nil
|
||||||
p.scratch = maps.NewScratch()
|
p.scratch = maps.NewScratch()
|
||||||
p.mainPageOutput = nil
|
p.mainPageOutput = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range s.Pages {
|
|
||||||
initPage(p)
|
|
||||||
}
|
|
||||||
for _, p := range s.headlessPages {
|
|
||||||
initPage(p)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Site) kindFromSections(sections []string) string {
|
func (s *Site) kindFromSections(sections []string) string {
|
||||||
|
|
Loading…
Reference in a new issue