Skip to content

Commit 706ff78

Browse files
committed
Fix build error.
#366 (comment)
1 parent b95aefa commit 706ff78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Scripts/DowloadPortalItemData.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ await withTaskGroup(of: Void.self) { group in
259259
fflush(stdout)
260260
group.addTask {
261261
do {
262-
let downloadName = try await downloadFile(
262+
guard let downloadName = try await downloadFile(
263263
from: portalItem.dataURL,
264264
to: destinationURL
265-
)
265+
) else { return }
266266
print("note: Downloaded item: \(portalItem.identifier)")
267267
fflush(stdout)
268268

269-
await MainActor.run {
270-
downloadedItems[portalItem.identifier] = downloadName
269+
_ = await MainActor.run {
270+
downloadedItems.updateValue(downloadName, forKey: portalItem.identifier)
271271
}
272272
} catch {
273273
print("error: Error downloading item \(portalItem.identifier): \(error.localizedDescription)")

0 commit comments

Comments
 (0)