Closed zina-vilmate closed 3 years ago
try wrapping the t.givenName[0] by a length check. If that works please submit a PR.
wrapping in a catch
? or where?
share your code
I'm asking permission in a previous component and I'm getting here only if permission is granted
Contacts.getAll()
.then(contacts => {
setListOfContact(contacts);
})
.catch(err => {
// and here I'm getting the error message null is not an object (evaluating t.givenName[0])
});
do you declare a variable t
anywhere?
Also try running the example app https://github.com/morenoh149/react-native-contacts/blob/8ef41d4563cf382e791b8c6fa6961d55559e84b6/example
This issue is stale, please provide more information about the status
I have an issue with some android devices such as Redmi Note 8T and Redmi Xiaomi 9T Pro when I'm calling
Contacts.getAll()
it's always resolving into errornull is not an object (evaluating t.givenName[0])
. I'm sure that the user gave the permissions and that all the contacts have givenName. I'm stuck for now and it's critically important for my app to have access to contacts.Any help welcome, thanks in advance.
react-native: 0.64.0 (same was with 0.63.4) react-native-contacts: ^6.0.4