diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-03-25 18:18:34 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-03-26 10:20:40 +0100 |
commit | 4dae52af680e6ff2c8cdeb4ce1f219330b27001c (patch) | |
tree | db157b09fc15b25a07512581fbd80536fe8e18ee /hugolib/page__paths.go | |
parent | 794d4052b87c98943588b35e1cfecc06e6a0c7f2 (diff) | |
download | hugo-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.go | 2 |
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() } |