Skip to content

Commit

Permalink
fix(service): fix force cast warning
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jul 27, 2021
1 parent c2f0db3 commit 7d0946c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firstfm/Service/LastFMAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LastFMAPI {
if statusCode != 200 {
if lastFMMethod == "user.getFriends" && statusCode == 400 {
// The API returns a 400 when the user has no friends 🤨
callback(FriendsResponse(friends: Friends(user: [])) as! T, nil)
callback((FriendsResponse(friends: Friends(user: [])) as! T), nil)
return
}
let error = NSError(domain: "", code: statusCode, userInfo: [ NSLocalizedDescriptionKey: "Invalid API response 😢. Please try again"])
Expand Down

0 comments on commit 7d0946c

Please sign in to comment.