Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Check for the presence of pages before setting dates
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Feb 27, 2016
1 parent 75cf324 commit 8046031
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -1711,8 +1711,10 @@ func (s *Site) newHomeNode() *Node {
n.IsHome = true
s.setURLs(n, "/")
n.Data["Pages"] = s.Pages
n.Date = s.Pages[0].Date
n.Lastmod = s.Pages[0].Lastmod
if len(s.Pages) != 0 {
n.Date = s.Pages[0].Date
n.Lastmod = s.Pages[0].Lastmod
}
return n
}

Expand Down

0 comments on commit 8046031

Please sign in to comment.