We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c487fb3 commit cf29124Copy full SHA for cf29124
Sources/ComposableArchitecture/Store.swift
@@ -343,8 +343,11 @@ public final class Store<State, Action> {
343
344
let tasks = Box<[Task<Void, Never>]>(wrappedValue: [])
345
346
- while !self.bufferedActions.isEmpty {
347
- let action = self.bufferedActions.removeFirst()
+ var index = self.bufferedActions.startIndex
+ defer { self.bufferedActions = [] }
348
+ while index < self.bufferedActions.endIndex {
349
+ defer { index += 1 }
350
+ let action = self.bufferedActions[index]
351
let effect = self.reducer(¤tState, action)
352
353
switch effect.operation {
0 commit comments