Closed koryteg closed 9 years ago
Could you please use the source of this repo and not the gem version if not done already? The gem has to be build newly but I cannot do this without Diego giving me more rights.
Perhaps if problem persist you can make pull request, happily to merge in
@koryteg Some basic validation should fix this but I don't have time. Can you make a pull request checking if any values are nil?
I was running into the same issue and made pull request #122. I think the existing nil check there was just slightly off.
I had a contact in gmail that was just a phone number(don't ask me how). but I get this error: undefined method `[]' for nil:NilClass
block in OmniContacts::Importer::Gmail#contacts_from_response on line 91: contact[:first_name], contact[:last_name], contact[:name] = email_to_name(contact[:emails][0][:email]) if contact[:name].nil? && contact[:emails][0][:email]
the error comes from contact[:emails][0][:email] because you cant call [:email] on nil ( because contact[:emails][0] is nil).