Skip to content

Commit

Permalink
Add explicit @MainActor to Button initializer
Browse files Browse the repository at this point in the history
This works around a regression in behavior introduced by Xcode 16 beta
3.
  • Loading branch information
stephencelis committed Oct 7, 2024
1 parent 7c3a9eb commit 29ca8d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/SwiftNavigation/ButtonState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ extension ButtonState: Sendable where Action: Sendable {}
/// - button: Button state.
/// - action: An action closure that is invoked when the button is tapped.
@available(iOS 15, macOS 12, tvOS 15, watchOS 8, *)
@MainActor
public init<Action>(_ button: ButtonState<Action>, action: @escaping (Action?) -> Void) {
self.init(
role: button.role.map(ButtonRole.init),
Expand Down

0 comments on commit 29ca8d6

Please sign in to comment.