Check if author is set

This commit is contained in:
Peter Stuifzand 2018-04-11 19:49:49 +02:00
parent 999bc0d456
commit 1142f4a1bc

View File

@ -330,7 +330,7 @@ func (b *memoryBackend) feedItems(fetchURL, contentType string, body io.Reader)
for i, v := range items {
// Clear type of author, when other fields also aren't set
if v.Author.Name == "" && v.Author.Photo == "" && v.Author.URL == "" {
if v.Author != nil && v.Author.Name == "" && v.Author.Photo == "" && v.Author.URL == "" {
v.Type = ""
items[i] = v
}