Closed mleonardallen closed 3 years ago
For Android, company can be string | null, but the type definition just has string. If we assume it exists as the type definition states, we can cause an app crash. For example:
company
string | null
string
null is not an object (evaluating 't.company.substring')
export interface Contact { recordID: string; backTitle: string; company: string; emailAddresses: EmailAddress[]; displayName: string; familyName: string; givenName: string; middleName: string; jobTitle: string; phoneNumbers: PhoneNumber[]; hasThumbnail: boolean; thumbnailPath: string; postalAddresses: PostalAddress[]; prefix: string; suffix: string; department: string; birthday: Birthday; imAddresses: InstantMessageAddress[] note: string; }
@mateosilguero nice. please patch the definitions https://github.com/morenoh149/react-native-contacts/blob/master/index.d.ts
For Android,
company
can bestring | null
, but the type definition just hasstring
. If we assume it exists as the type definition states, we can cause an app crash. For example:null is not an object (evaluating 't.company.substring')