hugolib: Check for nil in shouldRender

This commit is contained in:
Bjørn Erik Pedersen 2022-05-09 15:53:25 +02:00
parent 51f08b0b6a
commit 9d7f166244
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -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
}