Skip to content

Commit

Permalink
Fix compile error on Xcode 14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nssina committed May 1, 2023
1 parent 3e603c7 commit e477115
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Sources/NSAsyncCachedImage/NSAsyncCachedImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ public struct NSAsyncCachedImage<Placeholder>: View where Placeholder: View {

private var content: some View {
Group {
if let data = network.data,
!data.isEmpty {
if !network.data.isEmpty {
#if os(macOS)
image(Image(nsImage: NSImage(data: data) ?? NSImage()))
image(Image(nsImage: NSImage(data: network.data) ?? NSImage()))
#else
image(Image(uiImage: UIImage(data: data) ?? UIImage()))
image(Image(uiImage: UIImage(data: network.data) ?? UIImage()))
#endif
} else {
placeHolder
Expand Down

0 comments on commit e477115

Please sign in to comment.