Skip to content

Commit f6fea39

Browse files
authored
Save fetched posts even if the service instance is released (#19621)
Fixes #19607
2 parents ed3a360 + c0159b8 commit f6fea39

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

WordPress/Classes/Services/ReaderPostService+PostsV2.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ extension ReaderPostService {
77
}
88

99
let remoteService = ReaderPostServiceRemote.withDefaultApi()
10-
remoteService.fetchPosts(for: [topic.slug], page: nextPageHandle, success: { [weak self] posts, pageHandle in
11-
guard let self = self else {
12-
return
13-
}
14-
10+
remoteService.fetchPosts(for: [topic.slug], page: nextPageHandle, success: { posts, pageHandle in
1511
self.managedObjectContext.perform {
1612

1713
if self.managedObjectContext.parent == ContextManager.shared.mainContext {

0 commit comments

Comments
 (0)