Skip to content

Commit

Permalink
Fix optional handling in ImageCreationView
Browse files Browse the repository at this point in the history
  • Loading branch information
the-ounce committed Nov 17, 2023
1 parent 30de00a commit 97e70c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct ImageCreationView: View {
if !$store.images.isEmpty {
Section("Images") {
ForEach($store.images, id: \.self) { image in
let urlString = image.wrappedValue.url
let urlString = image.wrappedValue.url ?? ""
if let imageURL = URL(string: urlString), UIApplication.shared.canOpenURL(imageURL) {
LinkPreview(previewURL: imageURL)
.aspectRatio(contentMode: .fit)
Expand Down

0 comments on commit 97e70c4

Please sign in to comment.