Skip to content

Commit

Permalink
Fixes exception from onCancel callback
Browse files Browse the repository at this point in the history
OKTA-439256
<<<Jenkins Check-In of Tested SHA: 07dddc4 for [email protected]>>>
Artifact: okta-react-native
Files changed count: 1
PR Link: "#239"
  • Loading branch information
NikitaAvraimov-okta authored and eng-prod-CI-bot-okta committed Oct 29, 2021
1 parent d01741e commit b2bca31
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ public void onCancel() {
params.putString(OktaSdkConstant.RESOLVE_TYPE_KEY, OktaSdkConstant.CANCELLED);
sendEvent(reactContext, OktaSdkConstant.ON_CANCELLED, params);
final Promise promise = queuedPromise;
promise.reject(OktaSdkError.CANCELLED.getErrorCode(), OktaSdkError.CANCELLED.getErrorMessage());
if (promise != null) {
promise.reject(OktaSdkError.CANCELLED.getErrorCode(), OktaSdkError.CANCELLED.getErrorMessage());
}
queuedPromise = null;
}

Expand Down

0 comments on commit b2bca31

Please sign in to comment.