We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59634bf commit b084945Copy full SHA for b084945
SDWebImageSwiftUI/Classes/WebImage.swift
@@ -137,12 +137,12 @@ public struct WebImage : View {
137
/// Placeholder View Support
138
func setupPlaceholder() -> some View {
139
// 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 {
+ if let placeholder = placeholder {
141
// If use `.delayPlaceholder`, the placeholder is applied after loading failed, hide during loading :)
142
if imageManager.options.contains(.delayPlaceholder) && imageManager.isLoading {
143
return AnyView(configure(image: Image.empty))
144
} else {
145
- return AnyView(placeholder)
+ return placeholder
146
}
147
148
0 commit comments