Skip to content

Commit a91e08a

Browse files
committed
fix specs by checking raw_info fields presence
1 parent bc25b94 commit a91e08a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth/strategies/linkedin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class LinkedIn < OmniAuth::Strategies::OAuth2
3333
:last_name => raw_info['lastName'],
3434
:location => raw_info['location'],
3535
:description => raw_info['headline'],
36-
:image => raw_info['pictureUrls']['values'].first,
36+
:image => raw_info.fetch('pictureUrls', {}).fetch('values', []).first,
3737
:urls => {
3838
'public_profile' => raw_info['publicProfileUrl']
3939
}

0 commit comments

Comments
 (0)