Skip to content

Commit

Permalink
feat: allow for arrays with sls-offline
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Jul 28, 2024
1 parent 7e9d563 commit d4b3fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/policies/currentUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const currentUser = ({ event }) => {
const claimGroups = claims["cognito:groups"]
? claims["cognito:groups"]
: "[]";
const groups = claimGroups
const groups = Array.isArray(claimGroups) ? claimGroups : claimGroups
.substring(1, claimGroups.length - 1)
.split(" ")
.filter(Boolean);
Expand Down

0 comments on commit d4b3fe9

Please sign in to comment.