Skip to content

Commit

Permalink
Allow Binding<Case?> to write into nil (#54)
Browse files Browse the repository at this point in the history
Fixes #53.
  • Loading branch information
stephencelis committed Dec 14, 2022
1 parent 949a906 commit 46acf5e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Sources/SwiftUINavigation/Binding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ extension Binding {
.init(
get: { self.wrappedValue.flatMap(casePath.extract(from:)) },
set: { newValue, transaction in
guard self.wrappedValue != nil else { return }
self.transaction(transaction).wrappedValue = newValue.map(casePath.embed)
}
)
Expand Down

0 comments on commit 46acf5e

Please sign in to comment.