From 97e70c45f51b04ce6ebad1836f9fb6a0eec4e92a Mon Sep 17 00:00:00 2001 From: Mykyta Date: Fri, 17 Nov 2023 19:50:18 +0200 Subject: [PATCH] Fix optional handling in ImageCreationView --- Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift b/Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift index ef6628ff..98ea5216 100644 --- a/Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift +++ b/Demo/DemoChat/Sources/UI/Images/ImageCreationView.swift @@ -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)