Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for callback invocation with NO_RESULT #61
Due to the enumeration of cordova.callbackStatus (NO_RESULT = 0 and OK = 1), the logic used for defaulting to cordova.callbackStatus.OK will always default to cordova.callbackStatus.OK when the callbackStatus is set to cordova.callbackStatus.NO_RESULT.
This change addresses this issue by first checking if callbackOptions.status is null and defaulting to cordova.callbackStatus.OK, otherwise it will accept the callbackOptions.status value provided by the user.
I have created an issue in JIRA for this, thanks for bringing it to my attention.
Here's the long form proof ... I also considered using hasOwnProperty