{"action":"created","issue":{"url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/79","repository_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts","labels_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/79/comments","events_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/79/events","html_url":"https://github.com/joshuapinter/react-native-unified-contacts/issues/79","id":334381530,"node_id":"MDU6SXNzdWUzMzQzODE1MzA=","number":79,"title":"phoneNumbers is sometimes undefined","user":{"login":"jimmythompson","id":653864,"node_id":"MDQ6VXNlcjY1Mzg2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/653864?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmythompson","html_url":"https://github.com/jimmythompson","followers_url":"https://api.github.com/users/jimmythompson/followers","following_url":"https://api.github.com/users/jimmythompson/following{/other_user}","gists_url":"https://api.github.com/users/jimmythompson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmythompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmythompson/subscriptions","organizations_url":"https://api.github.com/users/jimmythompson/orgs","repos_url":"https://api.github.com/users/jimmythompson/repos","events_url":"https://api.github.com/users/jimmythompson/events{/privacy}","received_events_url":"https://api.github.com/users/jimmythompson/received_events","type":"User","site_admin":false},"labels":[{"id":875892942,"node_id":"MDU6TGFiZWw4NzU4OTI5NDI=","url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/labels/Good%20First%20Issue","name":"Good First Issue","color":"006b75","default":false},{"id":346725391,"node_id":"MDU6TGFiZWwzNDY3MjUzOTE=","url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":346725392,"node_id":"MDU6TGFiZWwzNDY3MjUzOTI=","url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-21T08:04:42Z","updated_at":"2018-06-25T20:56:09Z","closed_at":null,"author_association":"NONE","body":"Hey folks,\r\n\r\nWhen someone has added a contact in iOS (and I assume the same in Android) without adding any phone numbers for them, the return value from the getContacts call is a little weird.\r\n\r\nIn this case, I expected the getContacts call to return an empty list:\r\n\r\n```javascript\r\n{\r\n  contacts: [{\r\n    phoneNumbers: []\r\n  }]\r\n}\r\n```\r\n\r\nBut, at least as of 0a67cdb, it omits the field entirely from the result:\r\n\r\n```javascript\r\n{\r\n  contacts: [{}]\r\n}\r\n```\r\n\r\nWe just got burned by this. Is this something you'd be open to changing?\r\n\r\nIt means we now have to do a sanity check on the field before playing with the phone numbers:\r\n\r\ne.g. `contact.phoneNumbers && contact.phoneNumbers.map(...)`\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/comments/400092616","html_url":"https://github.com/joshuapinter/react-native-unified-contacts/issues/79#issuecomment-400092616","issue_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/79","id":400092616,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDA5MjYxNg==","user":{"login":"jimmythompson","id":653864,"node_id":"MDQ6VXNlcjY1Mzg2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/653864?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmythompson","html_url":"https://github.com/jimmythompson","followers_url":"https://api.github.com/users/jimmythompson/followers","following_url":"https://api.github.com/users/jimmythompson/following{/other_user}","gists_url":"https://api.github.com/users/jimmythompson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmythompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmythompson/subscriptions","organizations_url":"https://api.github.com/users/jimmythompson/orgs","repos_url":"https://api.github.com/users/jimmythompson/repos","events_url":"https://api.github.com/users/jimmythompson/events{/privacy}","received_events_url":"https://api.github.com/users/jimmythompson/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T20:56:09Z","updated_at":"2018-06-25T20:56:09Z","author_association":"NONE","body":"Hey @joshuapinter, I'd like to fix this. 😄 \r\n\r\nAs it's hard to put in automated tests, is there any standard way you check it all works? Maybe run the example app?"}}
{"actor":{"display_login":"jimmythompson"}}