diff options
-rw-r--r-- | sift.go | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -107,14 +107,16 @@ func main() { } } - authorsMap := m["authors"].([]interface{}) - for i, author := range authorsMap { - authorText := author.(string) - if i > 0 { - authors += " & " - authors += authorText - } else { - authors = authorText + if m["authors"] != nil { + authorsMap := m["authors"].([]interface{}) + for i, author := range authorsMap { + authorText := author.(string) + if i > 0 { + authors += " & " + authors += authorText + } else { + authors = authorText + } } } |