Skip to content

Commit

Permalink
(Android): Handle task outcomes where task is not successful but exce…
Browse files Browse the repository at this point in the history
…ption is null. Resolves #473.
  • Loading branch information
dpa99c committed Aug 11, 2020
1 parent 0949bfb commit 7d7e6d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/FirebasePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,7 @@ private void handleTaskOutcome(@NonNull Task<Void> task, CallbackContext callbac
@Override
public void onComplete(@NonNull Task<Void> task) {
try {
if (task.isSuccessful()) {
if (task.isSuccessful() || task.getException() == null) {
callbackContext.success();
}else if(task.getException() != null){
callbackContext.error(task.getException().getMessage());
Expand All @@ -2319,7 +2319,7 @@ public void onComplete(@NonNull Task<Void> task) {

private void handleAuthTaskOutcome(@NonNull Task<AuthResult> task, CallbackContext callbackContext) {
try {
if (task.isSuccessful()) {
if (task.isSuccessful() || task.getException() == null) {
callbackContext.success();
}else{
String errMessage = task.getException().getMessage();
Expand Down

0 comments on commit 7d7e6d8

Please sign in to comment.