diff --git a/Sources/SpotifyWebAPI/Object Model/Playlist Objects/Playlist.swift b/Sources/SpotifyWebAPI/Object Model/Playlist Objects/Playlist.swift index 788574dc..aafa0f72 100644 --- a/Sources/SpotifyWebAPI/Object Model/Playlist Objects/Playlist.swift +++ b/Sources/SpotifyWebAPI/Object Model/Playlist Objects/Playlist.swift @@ -99,7 +99,7 @@ public struct Playlist: SpotifyURIConvertible, Hashab [1]: https://developer.spotify.com/documentation/general/guides/working-with-playlists/ */ - public let images: [SpotifyImage] + public let images: [SpotifyImage]? /// The object type. Always ``IDCategory/playlist``. public let type: IDCategory @@ -155,7 +155,7 @@ public struct Playlist: SpotifyURIConvertible, Hashab href: URL, id: String, uri: String, - images: [SpotifyImage] + images: [SpotifyImage]? ) { self.name = name self.items = items @@ -187,7 +187,7 @@ extension Playlist: Codable { // MARK: Decode Images - self.images = try container.decodeSpotifyImages(forKey: .images) + self.images = try? container.decodeSpotifyImages(forKey: .images) self.name = try container.decodeIfPresent(