Skip to content

Commit 1dc99c3

Browse files
committed
Reset the main context before removing the store
1 parent 2ffb097 commit 1dc99c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WordPress/Classes/Utility/CoreDataHelper.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ extension CoreDataStack {
271271
throw ContextManager.ContextManagerError.missingDatabase
272272
}
273273

274+
mainContext.reset()
274275
try storeCoordinator.remove(store)
275276
let databaseReplaced = replaceDatabase(from: databaseLocation, to: currentDatabaseLocation)
276277

0 commit comments

Comments
 (0)