File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
SDWebImageSwiftUI/Classes Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -137,12 +137,12 @@ public struct WebImage : View {
137137 /// Placeholder View Support
138138 func setupPlaceholder( ) -> some View {
139139 // Don't use `Group` because it will trigger `.onAppear` and `.onDisappear` when condition view removed, treat placeholder as an entire component
140- if placeholder != nil {
140+ if let placeholder = placeholder {
141141 // If use `.delayPlaceholder`, the placeholder is applied after loading failed, hide during loading :)
142142 if imageManager. options. contains ( . delayPlaceholder) && imageManager. isLoading {
143143 return AnyView ( configure ( image: Image . empty) )
144144 } else {
145- return AnyView ( placeholder)
145+ return placeholder
146146 }
147147 } else {
148148 return AnyView ( configure ( image: Image . empty) )
You can’t perform that action at this time.
0 commit comments