Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-09 16:53:25 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-09 16:53:25 +0300
commit9d7f1662448439ad2058a5b48024f609e9784eb7 (patch)
tree2daadb3d6617163bb91e38264baf9050fb5bc0b8
parent51f08b0b6aae175299b4e73d521343a4386a9cf7 (diff)
hugolib: Check for nil in shouldRender
-rw-r--r--hugolib/hugo_sites.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index e0d69a8af..9f18f33bc 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -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
}