|
@@ -6,7 +6,7 @@ export default function RequireAuth({ children }) {
|
6
|
6
|
let auth = useAuth();
|
7
|
7
|
let location = useLocation();
|
8
|
8
|
let { authorities } = auth.getRole();
|
9
|
|
- authorities = authorities.map( e => e.toUpperCase());
|
|
9
|
+ authorities = authorities ? authorities.map( e => e.toUpperCase()) : [] ;
|
10
|
10
|
|
11
|
11
|
if (!auth.isLogged()) {
|
12
|
12
|
if( authorities.includes("CANDIDATO")){
|