firescript / nativescript-contacts

A nativescript module that gives access to the native contact directory.
MIT License
28 stars 32 forks source link

Adds null check for foundGroups #58

Closed jzgoda closed 5 years ago

jzgoda commented 5 years ago

Doing a getGroups() when there are no groups returned, the following null error occurs:

CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:15769:28: ERROR Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'foundGroups.count')
file:///app/tns_modules/nativescript-contacts/index.js:137:20

Adding the null check prevents the error.

jzgoda commented 5 years ago

Thank you!