lib/omniauth/strategies/yahoo.rb in omniauth-yahoo-0.0.7 vs lib/omniauth/strategies/yahoo.rb in omniauth-yahoo-0.0.8
- old
+ new
@@ -20,10 +20,10 @@
access_token.params['xoauth_yahoo_guid']
}
info do
primary_email = nil
- if user_info['emails']
+ if user_info['emails'] && !user_info['emails'].empty?
email_info = user_info['emails'].find{|e| e['primary']} || user_info['emails'].first
primary_email = email_info['handle']
end
{
:nickname => user_info['nickname'],