Merge branch 'mac-release'

This commit is contained in:
Brent Simmons 2019-09-03 22:59:29 -07:00
commit 2ec55e6587
1 changed files with 5 additions and 1 deletions

View File

@ -52,10 +52,14 @@ class FetchRequestOperation {
var fetchersReturned = 0
var fetchedArticles = Set<Article>()
for articleFetcher in articleFetchers {
var didCallCompletion = false
articleFetcher.fetchArticlesAsync { (articles) in
precondition(Thread.isMainThread)
if self.isCanceled {
if !didCallCompletion {
didCallCompletion = true
completion(self)
}
return
}
fetchedArticles.formUnion(articles)