For some reason using that variable would not pass unit tests. Took me an hour to figure out.

Sent from my BlackBerry 10 smartphone on the Rogers network.
From: Jeffrey Heifetz
Sent: Wednesday, May 8, 2013 9:49 AM
To: blackberry/cordova-blackberry-plugins
Reply To: blackberry/cordova-blackberry-plugins
Cc: Rosa Tse
Subject: Re: [cordova-blackberry-plugins] Refactor com.blackberry.pim.contacts to use cordova events and exec (#52)



In plugin/com.blackberry.pim.contacts/www/Contact.js:

> -            errorObj;
> -
> -        if (result._success) {
> -            if (successCallback) {
> -                result.id = result.id.toString();
> -                contactUtils.populateContact(result);
> -
> -                newContact = new Contact(result);
> -                successCallback(newContact);
> -            }
> -        } else {
> -            if (errorCallback && typeof(errorCallback) === "function") {
> -                errorObj = new ContactError(result.code);
> -                errorCallback(errorObj);
> -            }
> +    cordova.require("cordova/exec")(function (result) {


nitpick. why not use exec variable from the top

—
Reply to this email directly or view it on GitHub<https://github.com/blackberry/cordova-blackberry-plugins/pull/52/files#r4134051>.


---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.