Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The docs say:
http://docs.phonegap.com/en/2.2.0/cordova_contacts_contacts.md.html#contacts.find
A zero-length contactFields parameter will result in an array of Contact objects with only the id property populated.
The code says (in contacts.js):
if (!fields || (utils.isArray(fields) && fields.length === 0)) {
errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
}
I peeked at the iOS Contacts impl, and I don't think it looks for the case of an empty array.
Maybe simplest thing is to just make the docs say that an empty array is invalid?