aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page__paths.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-03-25 18:18:34 +0100
committerBjørn Erik Pedersen <[email protected]>2019-03-26 10:20:40 +0100
commit4dae52af680e6ff2c8cdeb4ce1f219330b27001c (patch)
treedb157b09fc15b25a07512581fbd80536fe8e18ee /hugolib/page__paths.go
parent794d4052b87c98943588b35e1cfecc06e6a0c7f2 (diff)
downloadhugo-4dae52af680e6ff2c8cdeb4ce1f219330b27001c.tar.gz
hugo-4dae52af680e6ff2c8cdeb4ce1f219330b27001c.zip
Avoid nilpointer on no File on Page
Fixes #5781
Diffstat (limited to 'hugolib/page__paths.go')
-rw-r--r--hugolib/page__paths.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/page__paths.go b/hugolib/page__paths.go
index 0a5dad5ef..8bc7a7535 100644
--- a/hugolib/page__paths.go
+++ b/hugolib/page__paths.go
@@ -99,7 +99,7 @@ func createTargetPathDescriptor(s *Site, p page.Page, pm *pageMeta) (page.Target
d := s.Deps
- if p.File() != nil {
+ if !p.File().IsZero() {
dir = p.File().Dir()
baseName = p.File().TranslationBaseName()
}