ref: 7d3dfba84b52ce8f33cc77380e3cc4c586a35201
parent: 3392133128da4f23df3ebcfb52e2ebbf827e714f
author: Mathias Biilmann <[email protected]>
date: Sun Sep 11 06:46:56 EDT 2016
Prevent panic on empty authorlist
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -193,8 +193,11 @@
func (p *Page) Authors() AuthorList {
authorKeys, ok := p.Params["authors"]
+ if !ok {
+ return AuthorList{}
+ }
authors := authorKeys.([]string)
- if !ok || len(authors) < 1 || len(p.Site.Authors) < 1 {
+ if len(authors) < 1 || len(p.Site.Authors) < 1 {
return AuthorList{}
}