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.
PresentationModifier
1 parent 2c316f6 commit 1b1355cCopy full SHA for 1b1355c
Sources/ComposableArchitecture/SwiftUI/PresentationModifier.swift
@@ -285,11 +285,12 @@ public struct PresentationStore<
285
? toID($0).map { AnyIdentifiable(Identified($0) { $0 }) }
286
: nil
287
},
288
- compactSend: {
+ compactSend: { [weak viewStore = self.viewStore] in
289
guard
290
+ let viewStore = viewStore,
291
$0 == nil,
- self.viewStore.wrappedValue != nil,
292
- id == nil || self.toID(self.viewStore.state) == id
+ viewStore.wrappedValue != nil,
293
+ id == nil || self.toID(viewStore.state) == id
294
else { return nil }
295
return .dismiss
296
}
0 commit comments