Don't try to insert if there are no articles.

This commit is contained in:
Maurice Parker 2020-04-29 20:06:14 -05:00
parent e83694ceb0
commit d27b0cb2a0
1 changed files with 1 additions and 1 deletions

View File

@ -847,7 +847,7 @@ private extension CloudKitAccountDelegate {
}
func insertSyncStatuses(articles: Set<Article>?, statusKey: SyncStatus.Key, flag: Bool) {
guard let articles = articles else {
guard let articles = articles, !articles.isEmpty else {
return
}
let syncStatuses = articles.map { article in