mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +00:00
hugolib: Check for nil in shouldRender
This commit is contained in:
1 file changed
+4
@@ -727,6 +727,10 @@ type BuildCfg struct {
|
||||
// For regular builds, this will allways return true.
|
||||
// TODO(bep) rename/work this.
|
||||
func (cfg *BuildCfg) shouldRender(p *pageState) bool {
|
||||
if p == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if p.forceRender {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user