mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +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()
|
||||
defer bp.PutBuffer(buffer)
|
||||
|
||||
isInnerShortcodeCache.RLock()
|
||||
err := tmpl.Execute(buffer, data)
|
||||
isInnerShortcodeCache.RUnlock()
|
||||
if err != nil {
|
||||
jww.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err)
|
||||
jww.WARN.Println(data)
|
||||
|
Reference in New Issue
Block a user