diff --git a/Mac/MainWindow/Timeline/FetchRequestOperation.swift b/Mac/MainWindow/Timeline/FetchRequestOperation.swift index e171f535f..223b2095b 100644 --- a/Mac/MainWindow/Timeline/FetchRequestOperation.swift +++ b/Mac/MainWindow/Timeline/FetchRequestOperation.swift @@ -52,10 +52,14 @@ class FetchRequestOperation { var fetchersReturned = 0 var fetchedArticles = Set
() for articleFetcher in articleFetchers { + var didCallCompletion = false articleFetcher.fetchArticlesAsync { (articles) in precondition(Thread.isMainThread) if self.isCanceled { - completion(self) + if !didCallCompletion { + didCallCompletion = true + completion(self) + } return } fetchedArticles.formUnion(articles)