mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Check for nil in shouldRender
This commit is contained in:
parent
51f08b0b6a
commit
9d7f166244
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue