Skip to content

Commit d05dc1e

Browse files
committed
Update ObservableSingleTask.swift
1 parent ecf86ac commit d05dc1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/async-task/task/ObservableSingleTask.swift

+5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
import SwiftUI
99

10+
#if compiler(>=5.9) && canImport(Observation)
11+
1012
extension Async {
13+
1114
/// A view model for managing a cancellable asynchronous task in a SwiftUI environment.
1215
///
1316
/// - Note: Exclusively operates on the main actor to ensure thread safety, making it suitable for
@@ -123,3 +126,5 @@ extension Async {
123126
}
124127
}
125128
}
129+
130+
#endif

0 commit comments

Comments
 (0)