Skip to content

Commit 92ede8b

Browse files
committed
updating with feedback from PR
1 parent f35e8c6 commit 92ede8b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/msal-browser/src/app/PublicClientApplication.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -575,9 +575,7 @@ export class PublicClientApplication {
575575
*/
576576
public getAccountByUsername(userName: string): IAccount {
577577
const allAccounts = this.getAllAccounts();
578-
return allAccounts.filter((accountObj) => {
579-
return accountObj.username === userName;
580-
})[0];
578+
return allAccounts.filter(accountObj => accountObj.username === userName)[0];
581579
}
582580

583581
// #endregion

samples/VanillaJSTestApp2.0/app/default/auth.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ function handleResponse(resp) {
4040
async function signIn(method) {
4141
signInType = isIE ? "loginRedirect" : method;
4242
if (signInType === "loginPopup") {
43-
myMSALObj.loginPopup(loginRequest).then(handleResponse).catch(function (error) {
43+
return myMSALObj.loginPopup(loginRequest).then(handleResponse).catch(function (error) {
4444
console.log(error);
4545
});
4646
} else if (signInType === "loginRedirect") {
47-
myMSALObj.loginRedirect(loginRequest)
47+
return myMSALObj.loginRedirect(loginRequest)
4848
}
4949
}
5050

0 commit comments

Comments
 (0)