Skip to content

Commit

Permalink
fix(TopUserAlbumsView): fix array check syntax for new Swift version
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jul 5, 2023
1 parent 41caa84 commit fca314b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firstfm/Views/Profile/TopUserAlbumsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ struct TopUserAlbumsView: View {
destination: AlbumView(album: ArtistAlbum(mbid: album.mbid, name: album.name, playcount: UInt(album.playcount) ?? 0, url: album.url, image: album.image)),
label: {
VStack {
if let image = album.image {
KFImage.url(URL(string: image[0].url != "" ? image[0].url : "https://lastfm.freetls.fastly.net/i/u/64s/4128a6eb29f94943c9d206c08e625904.webp")!)
if !album.image.isEmpty {
KFImage.url(URL(string: album.image[0].url != "" ? album.image[0].url : "https://lastfm.freetls.fastly.net/i/u/64s/4128a6eb29f94943c9d206c08e625904.webp")!)
.resizable()
.cornerRadius(5)
.aspectRatio(contentMode: .fill)
Expand Down

0 comments on commit fca314b

Please sign in to comment.