Andrew Grieve created CB-1931:
---------------------------------
Summary: Contact.find() docs don't match implementation for
zero-length array
Key: CB-1931
URL: https://issues.apache.org/jira/browse/CB-1931
Project: Apache Cordova
Issue Type: Bug
Components: CordovaJS, Docs
Reporter: Andrew Grieve
Assignee: Filip Maj
Priority: Minor
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?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira