We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb3a071 commit 67ac0bcCopy full SHA for 67ac0bc
Sources/ArcGISToolkit/Components/Popups/AttachmentsPopupElementView.swift
@@ -80,12 +80,11 @@ struct AttachmentsPopupElementView: View {
80
}
81
82
.task {
83
- if let attachmentModels = try? await popupElement.attachments.reversed().map({
84
- AttachmentModel(attachment: $0)
85
- }) {
86
- viewModel.attachmentModels.append(contentsOf: attachmentModels)
87
- isLoadingAttachments = false
+ let attachmentModels = try? await popupElement.attachments.reversed().map { attachment in
+ AttachmentModel(attachment: attachment)
88
+ viewModel.attachmentModels.append(contentsOf: attachmentModels ?? [])
+ isLoadingAttachments = false
89
90
91
0 commit comments