diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-25 18:18:34 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-26 10:20:40 +0100 |
commit | 4dae52af680e6ff2c8cdeb4ce1f219330b27001c (patch) | |
tree | db157b09fc15b25a07512581fbd80536fe8e18ee /hugolib/hugo_sites.go | |
parent | 794d4052b87c98943588b35e1cfecc06e6a0c7f2 (diff) |
Avoid nilpointer on no File on Page
Fixes #5781
Diffstat (limited to 'hugolib/hugo_sites.go')
-rw-r--r-- | hugolib/hugo_sites.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 0c79f4bdb..9fe2a5bdb 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -577,7 +577,7 @@ func (cfg *BuildCfg) shouldRender(p *pageState) bool { return true } - if cfg.whatChanged != nil && p.File() != nil { + if cfg.whatChanged != nil && !p.File().IsZero() { return cfg.whatChanged.files[p.File().Filename()] } |