mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
hugolib: Add a temporary workaround for page.copy() data race
See ##3129
This commit is contained in:
@ -1655,6 +1655,9 @@ func (p *Page) updatePageDates() {
|
||||
// copy creates a copy of this page with the lazy sync.Once vars reset
|
||||
// so they will be evaluated again, for word count calculations etc.
|
||||
func (p *Page) copy() *Page {
|
||||
// This is a temporary workaround for the data race in #3129
|
||||
p.getPermalink()
|
||||
|
||||
c := *p
|
||||
c.pageInit = &pageInit{}
|
||||
return &c
|
||||
|
Reference in New Issue
Block a user