From 5cddad64a66466feb82ee54e4c2f3e1a0e199c15 Mon Sep 17 00:00:00 2001 From: Thomas Schoffelen Date: Fri, 30 Aug 2024 15:57:35 +0100 Subject: [PATCH] chore: lint --- src/policies/currentUser.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/policies/currentUser.js b/src/policies/currentUser.js index 0967d1a..02d10c7 100644 --- a/src/policies/currentUser.js +++ b/src/policies/currentUser.js @@ -11,10 +11,12 @@ const currentUser = ({ event }) => { const claimGroups = claims["cognito:groups"] ? claims["cognito:groups"] : "[]"; - const groups = Array.isArray(claimGroups) ? claimGroups : claimGroups - .substring(1, claimGroups.length - 1) - .split(" ") - .filter(Boolean); + const groups = Array.isArray(claimGroups) + ? claimGroups + : claimGroups + .substring(1, claimGroups.length - 1) + .split(" ") + .filter(Boolean); function hasGroup(group) { return groups.includes(group);