diff --git a/Views/UIKit/CompositionView.swift b/Views/UIKit/CompositionView.swift index 48b3e1c..5c0cda0 100644 --- a/Views/UIKit/CompositionView.swift +++ b/Views/UIKit/CompositionView.swift @@ -397,7 +397,8 @@ private extension CompositionView { for removal in diff.removals { guard case let .remove(_, id, _) = removal, - let index = attachmentUploadsStackView.arrangedSubviews.firstIndex(where: { ($0 as? AttachmentUploadView)?.id == id }) + let index = attachmentUploadsStackView.arrangedSubviews + .firstIndex(where: { ($0 as? AttachmentUploadView)?.id == id }) else { continue } attachmentUploadsStackView.arrangedSubviews[index].removeFromSuperview()