mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Fix potential data race in test
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user