fix: Panic occured when exec --next-tag with HEAD with tag

This commit is contained in:
vvakame 2018-11-09 15:35:18 +09:00
parent 594ec82eaf
commit e407b9a96e

View file

@ -195,7 +195,7 @@ func (gen *Generator) readVersions(tags []*Tag, first string) ([]*Version, error
})
// Instead of `getTags()`, assign the date to the tag
if isNext {
if isNext && len(commits) != 0 {
tag.Date = commits[0].Author.Date
}
}