Skip to content

Commit 1a7fb26

Browse files
committed
Fixed build for Swift 5.9
1 parent 28f885f commit 1a7fb26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/ButtonKit/Modifiers/Button+AsyncTask.swift

+4
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ struct OnAsyncButtonTaskChangeModifier: ViewModifier {
7777
func body(content: Content) -> some View {
7878
content
7979
.onPreferenceChange(AsyncButtonTaskPreferenceKey.self) { state in
80+
#if swift(>=5.10)
8081
MainActor.assumeIsolated {
8182
onTaskChanged(state)
8283
}
84+
#else
85+
onTaskChanged(state)
86+
#endif
8387
}
8488
}
8589

0 commit comments

Comments
 (0)