Skip to content

Commit

Permalink
[FIX] Added callbackContext.error if the user executes API methods wi…
Browse files Browse the repository at this point in the history
…thout having initializing the session first.
  • Loading branch information
Renemari Padillo committed Mar 19, 2016
1 parent 1e9a23c commit 85cc5b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
this.onChannelSelected = callbackContext;
return true;
}
} else {
callbackContext.error("Branch instance not set. Please execute initSession() first.");
}
}

Expand Down Expand Up @@ -242,8 +244,7 @@ private void redeemRewards(final int value)
* @param count A {@link Integer} specifying the number of credits to attempt to redeem from
* the bucket.
*/
private void redeemRewards(int value, String bucket)
{
private void redeemRewards(int value, String bucket) {

Log.d(LCAT, "start redeemRewards()");

Expand Down

0 comments on commit 85cc5b3

Please sign in to comment.