Skip to content

Commit 67ac0bc

Browse files
dfeinzimermhdostal
andauthored
Update Sources/ArcGISToolkit/Components/Popups/AttachmentsPopupElementView.swift
Co-authored-by: Mark Dostal <[email protected]>
1 parent bb3a071 commit 67ac0bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Sources/ArcGISToolkit/Components/Popups/AttachmentsPopupElementView.swift

+4-5
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ struct AttachmentsPopupElementView: View {
8080
}
8181
}
8282
.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
83+
let attachmentModels = try? await popupElement.attachments.reversed().map { attachment in
84+
AttachmentModel(attachment: attachment)
8885
}
86+
viewModel.attachmentModels.append(contentsOf: attachmentModels ?? [])
87+
isLoadingAttachments = false
8988
}
9089
}
9190
}

0 commit comments

Comments
 (0)