Просмотр исходного кода

Fix isAuth returning undefined

jnfrati 3 лет назад
Родитель
Сommit
830743884d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      dashboard/src/shared/auth/useAuth.ts

+ 1 - 1
dashboard/src/shared/auth/useAuth.ts

@@ -29,7 +29,7 @@ const useAuth = () => {
       }
       // We iterate over all the policies in search for at least one policy that will authorize
       // the user to perform an action.
-      authContext.currentPolicy.reduce(
+      return authContext.currentPolicy.reduce(
         isAuthorizedReducer(scope, resource, verb),
         false
       );