diff options
author | kaa <kaa@disroot.org> | 2024-09-02 13:00:54 -0700 |
---|---|---|
committer | kaa <kaa@disroot.org> | 2024-09-02 13:00:54 -0700 |
commit | dd1d5bf6136e9d14886e750f260ecf0478b994b2 (patch) | |
tree | 16f275386a47a515762d7616d3b7a66ba5447238 /sift.go | |
parent | ad391f572ee7272895f63d47a4231b282a50f7d0 (diff) |
Check if there are any authors to speak of, instead of failing.
Diffstat (limited to 'sift.go')
-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 + } } } |