Skip to content

Commit 72a599e

Browse files
CalebRasyo1995
andauthored
Apply suggestions from code review.
Co-authored-by: Ting <[email protected]>
1 parent 8594cfe commit 72a599e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/DowloadPortalItemData.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// A mapping of item IDs to filenames is maintained in the download directory.
2020
// This mapping efficiently checks whether an item has already been downloaded.
2121
// If an item already exists, it will skip that item.
22-
// To delete and re-downloaded an item, remove it's entry in the plist.
22+
// To delete and re-downloaded an item, remove its entry from the plist.
2323

2424
import Foundation
2525

@@ -234,7 +234,7 @@ var downloadedItems = previousDownloadedItems
234234
await withTaskGroup(of: Void.self) { group in
235235
for portalItem in portalItems {
236236
// Checks to see if an item is already downloaded.
237-
guard downloadedItems[portalItem.identifier] == nil else {
237+
guard !downloadedItems.keys.contains(portalItem.identifier) else {
238238
print("note: Item already downloaded: \(portalItem.identifier)")
239239
continue
240240
}

0 commit comments

Comments
 (0)