mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05: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()
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue