mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix bug triggered by having no authors associated with a starred article.
This commit is contained in:
@@ -233,7 +233,7 @@ private extension CloudKitArticlesZone {
|
||||
let encoder = JSONEncoder()
|
||||
var parsedAuthors = [String]()
|
||||
|
||||
if let authors = article.authors {
|
||||
if let authors = article.authors, !authors.isEmpty {
|
||||
for author in authors {
|
||||
let parsedAuthor = ParsedAuthor(name: author.name,
|
||||
url: author.url,
|
||||
@@ -243,10 +243,9 @@ private extension CloudKitArticlesZone {
|
||||
parsedAuthors.append(encodedParsedAuthor)
|
||||
}
|
||||
}
|
||||
articleRecord[CloudKitArticle.Fields.parsedAuthors] = parsedAuthors
|
||||
}
|
||||
|
||||
articleRecord[CloudKitArticle.Fields.parsedAuthors] = parsedAuthors
|
||||
|
||||
records.append(articleRecord)
|
||||
return records
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user