Skip to content

Commit

Permalink
Fix Alert.Button.init action (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ski-u authored Dec 14, 2022
1 parent b36d135 commit 949a906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/_SwiftUINavigationState/ButtonState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ extension ButtonState: Hashable where Action: Hashable {

extension Alert.Button {
public init<Action>(_ button: ButtonState<Action>, action: @escaping (Action) -> Void) {
let action = button.action.map { _ in { button.withAction(action) } }
let action = { button.withAction(action) }
switch button.role {
case .cancel:
self = .cancel(Text(button.label), action: action)
Expand Down

0 comments on commit 949a906

Please sign in to comment.