mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-06 13:20:12 +01:00
Merge pull request #288 from ruslanskorb/list-monitor-number-of-objects-performance
[ListMonitor] Fix performance of `numberOfObjects()`.
This commit is contained in:
@@ -232,7 +232,7 @@ public final class ListMonitor<D: DynamicObject>: Hashable {
|
||||
!self.isPendingRefetch || Thread.isMainThread,
|
||||
"Attempted to access a \(cs_typeName(self)) outside the main thread while a refetch is in progress."
|
||||
)
|
||||
return self.fetchedResultsController.fetchedObjects?.count ?? 0
|
||||
return (self.fetchedResultsController.fetchedObjects as NSArray?)?.count ?? 0
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user