From cc1713458d77af645094e9603f3926ca49e121ac Mon Sep 17 00:00:00 2001 From: Brandon Williams <135203+mbrandonw@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:20:15 -0800 Subject: [PATCH] Record state access when constructing _StoreCollection. (#3521) --- .../Observation/IdentifiedArray+Observation.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift b/Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift index 4206dc1702d2..8966058683be 100644 --- a/Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift +++ b/Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift @@ -100,6 +100,7 @@ public struct _StoreCollection: RandomAc #endif fileprivate init(_ store: Store, IdentifiedAction>) { self.store = store + store._$observationRegistrar.access(store, keyPath: \.currentState) self.data = store.withState { $0 } }