Merge branch 'master' into accent-color-experimental

This commit is contained in:
Maurice Parker 2020-04-14 08:08:38 -05:00
commit 0cfbd38d38
1 changed files with 2 additions and 3 deletions

View File

@ -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,9 +243,8 @@ private extension CloudKitArticlesZone {
parsedAuthors.append(encodedParsedAuthor)
}
}
}
articleRecord[CloudKitArticle.Fields.parsedAuthors] = parsedAuthors
}
records.append(articleRecord)
return records