mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
hugolib: Check for nil in shouldRender
This commit is contained in:
@@ -727,6 +727,10 @@ type BuildCfg struct {
|
|||||||
// For regular builds, this will allways return true.
|
// For regular builds, this will allways return true.
|
||||||
// TODO(bep) rename/work this.
|
// TODO(bep) rename/work this.
|
||||||
func (cfg *BuildCfg) shouldRender(p *pageState) bool {
|
func (cfg *BuildCfg) shouldRender(p *pageState) bool {
|
||||||
|
if p == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if p.forceRender {
|
if p.forceRender {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user