소스 검색

Merge pull request #2337 from lunarway/master

🐛 Session Task crashed with force unwrap
Wei Wang 1 년 전
부모
커밋
af2a51d7f9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Sources/Networking/ImageDownloader.swift

+ 1 - 1
Sources/Networking/ImageDownloader.swift

@@ -82,7 +82,7 @@ public final class DownloadTask: @unchecked Sendable {
     /// When you call ``DownloadTask/cancel()``, this ``SessionDataTask`` and its cancellation token will be passed
     /// along. You can use them to identify the cancelled task.
     public private(set) var sessionTask: SessionDataTask? {
-        get { propertyQueue.sync { _sessionTask! } }
+        get { propertyQueue.sync { _sessionTask } }
         set { propertyQueue.sync { _sessionTask = newValue } }
     }