Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 1bc61fe

Browse files
TS compile error fixed
1 parent 33699a3 commit 1bc61fe

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/app/auth/index.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ export module auth {
4545
operationType: "SignIn",
4646
user: user,
4747
});
48-
}, (err => {
49-
{
50-
let code = 'auth/exception';
51-
let message = err.toString();
52-
// Identify code for android. Note that the IOS implementation doesn't return a code.
53-
if (message.includes('com.google.firebase.auth.FirebaseAuthInvalidCredentialsException')) {
54-
code = 'auth/wrong-password';
55-
} else if (message.includes('com.google.firebase.auth.FirebaseAuthInvalidUserException')) {
56-
code = 'auth/user-not-found';
48+
}).catch(err => {
49+
let code = 'auth/exception';
50+
let message = err.toString();
51+
// Identify code for android. Note that the IOS implementation doesn't return a code.
52+
if (message.includes('com.google.firebase.auth.FirebaseAuthInvalidCredentialsException')) {
53+
code = 'auth/wrong-password';
54+
} else if (message.includes('com.google.firebase.auth.FirebaseAuthInvalidUserException')) {
55+
code = 'auth/user-not-found';
5756
// Note that Android returns one exception for both user not found and invalid email whereas
5857
// the web api returns seperate codes. Therefore the conditional below can never be satisfied
5958
// for android.
@@ -62,9 +61,9 @@ export module auth {
6261
}
6362
reject({
6463
code: code,
65-
message: message,
66-
});
67-
}));
64+
message: message
65+
})
66+
});
6867
});
6968
}
7069

0 commit comments

Comments
 (0)