Skip to content

Commit 3054dfe

Browse files
authored
Merge branch 'main' into update-issue-formatting
2 parents 7eaaf82 + a9c3fec commit 3054dfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/ComposableArchitecture/Store.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ public final class Store<State, Action>: _Store {
343343
.sink { [weak self, weak parent] _ in
344344
guard let scopeID = self?.scopeID
345345
else { return }
346-
parent?.removeChild(scopeID: scopeID)
346+
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(300)) {
347+
parent?.removeChild(scopeID: scopeID)
348+
}
347349
} receiveValue: { [weak self] _ in
348350
guard let self else { return }
349351
self._$observationRegistrar.withMutation(of: self, keyPath: \.currentState) {}

0 commit comments

Comments
 (0)