There seems to be a bug in #SwiftUI where @EnvironmentObject
will be no longer available if the user pulls down a modal sheet to close it, but cancels the gesture leaving it open.
Actual error:
SwiftUI:0: Fatal error: No ObservableObject of type found. A View.environmentObject(_:) for may be missing as an ancestor of this view.
It doesn't happen all the time, but finding it not too hard to reproduce. Does anyone know of a fix?