mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-23 07:01:34 +00:00
Fix potential data race in test
This commit is contained in:
parent
39c74b70dc
commit
8fe48a6576
1 changed files with 2 additions and 0 deletions
|
@ -558,7 +558,9 @@ func renderShortcodeWithPage(tmpl *template.Template, data *ShortcodeWithPage) s
|
||||||
buffer := bp.GetBuffer()
|
buffer := bp.GetBuffer()
|
||||||
defer bp.PutBuffer(buffer)
|
defer bp.PutBuffer(buffer)
|
||||||
|
|
||||||
|
isInnerShortcodeCache.RLock()
|
||||||
err := tmpl.Execute(buffer, data)
|
err := tmpl.Execute(buffer, data)
|
||||||
|
isInnerShortcodeCache.RUnlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
jww.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err)
|
jww.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err)
|
||||||
jww.WARN.Println(data)
|
jww.WARN.Println(data)
|
||||||
|
|
Loading…
Reference in a new issue