FIX: Use safe navigation operator when looking for avatar URL

This commit is contained in:
David Taylor 2018-12-03 17:28:21 +00:00
parent 404acef6e3
commit 4e2cc9caf0
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ class Auth::ManagedAuthenticator < Auth::Authenticator
def after_create_account(user, auth)
data = auth[:extra_data]
create_association!(data.merge(user: user))
retrieve_avatar(user, data["info"]["image"])
retrieve_avatar(user, data&.[]("info")&.[]("image"))
end
def retrieve_avatar(user, url)