Skip to content

Commit

Permalink
fix specs by checking raw_info fields presence
Browse files Browse the repository at this point in the history
  • Loading branch information
EppO committed Aug 28, 2015
1 parent bc25b94 commit a91e08a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/linkedin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LinkedIn < OmniAuth::Strategies::OAuth2
:last_name => raw_info['lastName'],
:location => raw_info['location'],
:description => raw_info['headline'],
:image => raw_info['pictureUrls']['values'].first,
:image => raw_info.fetch('pictureUrls', {}).fetch('values', []).first,
:urls => {
'public_profile' => raw_info['publicProfileUrl']
}
Expand Down

0 comments on commit a91e08a

Please sign in to comment.