Skip to content

Commit

Permalink
fix: auth filter expression (aws-amplify#8248)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwaySway committed Sep 24, 2021
1 parent 3136018 commit addc28c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ const generateAuthFilter = (
return [
iff(
not(ref(IS_AUTHORIZED_FLAG)),
qref(methodCall(ref('ctx.stash.put'), str('authFilter'), authFilter.length > 1 ? obj({ or: list(authFilter) }) : list(authFilter))),
qref(
methodCall(
ref('ctx.stash.put'),
str('authFilter'),
authFilter.length > 1 ? obj({ or: list(authFilter) }) : compoundExpression(authFilter),
),
),
),
];
}
Expand Down

0 comments on commit addc28c

Please sign in to comment.