Skip to content

Commit 3fb9a83

Browse files
authored
fix: add null check for endSessionPromise (#1058)
1 parent 85f1ce6 commit 3fb9a83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,10 @@ public void onTokenRequestCompleted(
578578
return;
579579
}
580580
final Promise endSessionPromise = this.promise;
581-
WritableMap map = EndSessionResponseFactory.endSessionResponseToMap(response);
582-
endSessionPromise.resolve(map);
581+
if (endSessionPromise != null) {
582+
WritableMap map = EndSessionResponseFactory.endSessionResponseToMap(response);
583+
endSessionPromise.resolve(map);
584+
}
583585
}
584586
} catch (Exception e) {
585587
if(promise != null) {

0 commit comments

Comments
 (0)