소스 검색

invalid auth permiss cookie

amenpunk 2 년 전
부모
커밋
17a6f25a8f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Components/PrivateRoute.js

+ 1 - 1
src/Components/PrivateRoute.js

@@ -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")){