Skip to content

Commit

Permalink
fix(amplify-category-auth): add handling for undefined autoVerifiedAt…
Browse files Browse the repository at this point in the history
…tributes (#7780)
  • Loading branch information
johnpc authored Jul 22, 2021
1 parent ef12705 commit 3aac45d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% var autoVerifiedAttributes = props.autoVerifiedAttributes.concat(props.aliasAttributes).filter((attr, i, aliasAttributeArray) => ['email', 'phone_number'].includes(attr) && aliasAttributeArray.indexOf(attr) === i) %>
<% var autoVerifiedAttributes = props.autoVerifiedAttributes ? props.autoVerifiedAttributes.concat(props.aliasAttributes).filter((attr, i, aliasAttributeArray) => ['email', 'phone_number'].includes(attr) && aliasAttributeArray.indexOf(attr) === i) : [] %>
AWSTemplateFormatVersion: 2010-09-09

Parameters:
Expand Down Expand Up @@ -164,7 +164,7 @@ Resources:
- <%= autoVerifiedAttributes[x] %>
<% } %>
<% } %>
<%if (autoVerifiedAttributes.includes('email')) { %>
<%if (autoVerifiedAttributes && autoVerifiedAttributes.includes('email')) { %>
EmailVerificationMessage: !Ref emailVerificationMessage
EmailVerificationSubject: !Ref emailVerificationSubject
<% } %>
Expand Down

0 comments on commit 3aac45d

Please sign in to comment.