Skip to content

Commit 5e2ffc5

Browse files
committed
fix(login): prevent error when checking for blocked user JWT authorization
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 82c19c7 commit 5e2ffc5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/app/shared/components/auth/login/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export class LoginComponent implements OnInit {
151151
this.startLogin = false;
152152
this.authenticationError = true;
153153
const utmStackError = err.headers.get('X-UtmStack-error');
154-
if (utmStackError.includes('UserJWTController.authorize: blocked')) {
154+
if (utmStackError && utmStackError.includes('UserJWTController.authorize: blocked')) {
155155
this.utmToast.showError('Login blocked', 'Your ip was blocked due multiple login failures, please try again in 10 minutes');
156156
} else {
157157
this.utmToast.showError('Login fail', 'Authentication error, ' +

0 commit comments

Comments
 (0)