Skip to content
Snippets Groups Projects
Commit 0827208c authored by Michael Marttila's avatar Michael Marttila
Browse files

Spacing style fix

parent b53b7fdf
No related branches found
No related tags found
No related merge requests found
......@@ -6,18 +6,18 @@ import { hasValue } from '../empty.util';
@Injectable()
export class MockAdminGuard implements CanActivate, CanActivateChild {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
//if being run in browser, enforce 'isAdmin' requirement
if (typeof window === 'object' && hasValue(window.localStorage)) {
if (window.localStorage.getItem('isAdmin') === 'true') {
return true;
}
return false;
}
return true;
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
// if being run in browser, enforce 'isAdmin' requirement
if (typeof window === 'object' && hasValue(window.localStorage)) {
if (window.localStorage.getItem('isAdmin') === 'true') {
return true;
}
return false;
}
return true;
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
return this.canActivate(route, state);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
return this.canActivate(route, state);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment