Skip to content

Commit 82090d7

Browse files
FallenDestinyFallen Destiny
and
Fallen Destiny
authored
fix: guard null promise in case of skipCodeExchange (#595)
Co-authored-by: Fallen Destiny <[email protected]>
1 parent efbb64b commit 82090d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/com/rnappauth/RNAppAuthModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ public void onActivityResult(Activity activity, int requestCode, int resultCode,
397397

398398
if (this.skipCodeExchange) {
399399
WritableMap map = TokenResponseFactory.authorizationResponseToMap(response);
400-
promise.resolve(map);
400+
if (promise != null) {
401+
promise.resolve(map);
402+
}
401403
return;
402404
}
403405

0 commit comments

Comments
 (0)