Skip to content

Commit

Permalink
hugolib: Add missing zero check on file
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jun 26, 2020
1 parent 057b137 commit ccfaeb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hugolib/page__meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,16 +728,18 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo
}

var id string
var filename string
if !p.f.IsZero() {
id = p.f.UniqueID()
filename = p.f.Filename()
}

cpp, err := cp.New(
converter.DocumentContext{
Document: newPageForRenderHook(ps),
DocumentID: id,
DocumentName: p.Path(),
Filename: p.f.Filename(),
Filename: filename,
ConfigOverrides: renderingConfigOverrides,
},
)
Expand Down

0 comments on commit ccfaeb6

Please sign in to comment.