Skip to content

Commit 996f65e

Browse files
committed
Fix the issue that AnimatedImage name and data initializer does not works
1 parent 3ae64cf commit 996f65e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public struct AnimatedImage : PlatformViewRepresentable {
122122
#else
123123
let image = SDAnimatedImage(named: name, in: bundle, compatibleWith: nil)
124124
#endif
125-
self.image = image
125+
_image = .init(wrappedValue: image)
126126
}
127127

128128
/// Create an animated image with data and scale.
@@ -139,7 +139,7 @@ public struct AnimatedImage : PlatformViewRepresentable {
139139
public init(data: Data, scale: CGFloat = 0, isAnimating: Binding<Bool>) {
140140
self._isAnimating = isAnimating
141141
let image = SDAnimatedImage(data: data, scale: scale)
142-
self.image = image
142+
_image = .init(wrappedValue: image)
143143
}
144144

145145
#if os(macOS)

0 commit comments

Comments
 (0)