Commit 7d90449f by Bharti Ladumor

Authgurad null check

parent 0cd09b13
...@@ -37,7 +37,7 @@ export class AuthGuard implements CanActivate { ...@@ -37,7 +37,7 @@ export class AuthGuard implements CanActivate {
if (data.UserName === 'noprivauthtoken') { if (data.UserName === 'noprivauthtoken') {
const url = window.location.href; const url = window.location.href;
const matches = url.match(/job\/(\d+)\/message-engine/); const matches = url.match(/job\/(\d+)\/message-engine/);
if (matches[1]) { if (matches && matches[1]) {
redirectPage = redirectPage.replace(':jobId', matches[1]); redirectPage = redirectPage.replace(':jobId', matches[1]);
window.location.href = `${environment.baseUrl + redirectPage}&from=Messaging`; window.location.href = `${environment.baseUrl + redirectPage}&from=Messaging`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment