From a30cfe1a1e1f199701c219cbfc80d000200240c5 Mon Sep 17 00:00:00 2001 From: Alexandre Bove Date: Fri, 1 Aug 2025 08:51:42 +0200 Subject: [PATCH] Refactor isAuthenticated check to use Boolean for clarity --- src/graphql/context/features/guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphql/context/features/guard.ts b/src/graphql/context/features/guard.ts index 82b5876..0a968b0 100644 --- a/src/graphql/context/features/guard.ts +++ b/src/graphql/context/features/guard.ts @@ -2,7 +2,7 @@ import { GuardFunction } from "@/graphql/context/types"; const initGuard: GuardFunction = auth => { return { - isAuthenticated: !!auth?.accessToken, + isAuthenticated: Boolean(auth?.accessToken), hasRole: (roleName: string) => { return Array.isArray(auth?.roles) && auth.roles.some(r => r.name === roleName); },