Skip to content

Commit 5b7a48d

Browse files
committed
Use assertion instead of precondition and fix description
1 parent 7242f1f commit 5b7a48d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: ViewEnvironmentUI/Sources/ViewEnvironmentPropagating.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ public final class ViewEnvironmentUpdateObservationLifetime {
382382
///
383383
public func remove() {
384384
guard let onRemove else {
385-
preconditionFailure("Environment customization was already removed")
385+
assertionFailure("Environment update observation was already removed")
386+
return
386387
}
387388
self.onRemove = nil
388389
onRemove()

0 commit comments

Comments
 (0)