mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
fixed tslint error
This commit is contained in:
@@ -54,7 +54,7 @@ describe('AuthNavMenuComponent', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: HostWindowService, useValue: window},
|
{provide: HostWindowService, useValue: window},
|
||||||
{provide: AuthService, useValue: {setRedirectUrl: () => {}}}
|
{provide: AuthService, useValue: {setRedirectUrl: () => { /*empty*/ }}}
|
||||||
],
|
],
|
||||||
schemas: [
|
schemas: [
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
CUSTOM_ELEMENTS_SCHEMA
|
||||||
@@ -224,7 +224,7 @@ describe('AuthNavMenuComponent', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: HostWindowService, useValue: window},
|
{provide: HostWindowService, useValue: window},
|
||||||
{provide: AuthService, useValue: {setRedirectUrl: () => {}}}
|
{provide: AuthService, useValue: {setRedirectUrl: () => { /*empty*/ }}}
|
||||||
],
|
],
|
||||||
schemas: [
|
schemas: [
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
CUSTOM_ELEMENTS_SCHEMA
|
||||||
|
@@ -62,8 +62,12 @@ export class AuthNavMenuComponent implements OnInit {
|
|||||||
this.showAuth = this.store.select(routerStateSelector)
|
this.showAuth = this.store.select(routerStateSelector)
|
||||||
.filter((router: RouterReducerState) => isNotUndefined(router) && isNotUndefined(router.state))
|
.filter((router: RouterReducerState) => isNotUndefined(router) && isNotUndefined(router.state))
|
||||||
.map((router: RouterReducerState) => {
|
.map((router: RouterReducerState) => {
|
||||||
return !router.state.url.startsWith(LOGIN_ROUTE) && !router.state.url.startsWith(LOGOUT_ROUTE);
|
const url = router.state.url;
|
||||||
|
const show = !router.state.url.startsWith(LOGIN_ROUTE) && !router.state.url.startsWith(LOGOUT_ROUTE);
|
||||||
|
if (show) {
|
||||||
|
this.authService.setRedirectUrl(url);
|
||||||
|
}
|
||||||
|
return show;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user