Skip to content

Commit

Permalink
fix(api-security-cognito): type of the object key
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric committed Aug 27, 2024
1 parent 0e806b2 commit 3f7c10b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/api-security-cognito/src/syncWithCognito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ export const syncWithCognito = ({

adminUsers.onUserAfterUpdate.subscribe(async ({ originalUser, updatedUser, inputData }) => {
const newAttributes = Object.keys(updateAttributes).map(attr => {
const mappedAttr = updateAttributes[attr] as MappedAttrType;
const mappedAttr = updateAttributes[
attr as keyof typeof updateAttributes
] as MappedAttrType;
const attrValue =
typeof mappedAttr === "function"
? mappedAttr(updatedUser)
Expand Down

0 comments on commit 3f7c10b

Please sign in to comment.