Avoid nilpointer on no File on Page

Fixes #5781
This commit is contained in:
Bjørn Erik Pedersen
2019-03-25 18:18:34 +01:00
parent 794d4052b8
commit 4dae52af68
15 changed files with 213 additions and 16 deletions

View File

@@ -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()]
}