mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Add a temporary workaround for page.copy() data race
See ##3129
This commit is contained in:
parent
c7b8c45d12
commit
6c5ef71368
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue