Skip to content

Commit cc17134

Browse files
authored
Record state access when constructing _StoreCollection. (#3521)
1 parent 8d727d6 commit cc17134

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public struct _StoreCollection<ID: Hashable & Sendable, State, Action>: RandomAc
100100
#endif
101101
fileprivate init(_ store: Store<IdentifiedArray<ID, State>, IdentifiedAction<ID, Action>>) {
102102
self.store = store
103+
store._$observationRegistrar.access(store, keyPath: \.currentState)
103104
self.data = store.withState { $0 }
104105
}
105106

0 commit comments

Comments
 (0)