File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/template-retail-react-app/app/components/social-login Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const IDP_CONFIG = {
4242 * @param {array } idps - array of known IDPs to show buttons for
4343 * @returns
4444 */
45- const SocialLogin = ( { form, idps} ) => {
45+ const SocialLogin = ( { form, idps = [ ] } ) => {
4646 const { formatMessage} = useIntl ( )
4747 const authorizeIDP = useAuthHelper ( AuthHelpers . AuthorizeIDP )
4848
@@ -52,7 +52,8 @@ const SocialLogin = ({form, idps}) => {
5252 const redirectURI = buildRedirectURI ( appOrigin , redirectPath )
5353
5454 const isIdpValid = ( name ) => {
55- return name in IDP_CONFIG && IDP_CONFIG [ name . toLowerCase ( ) ]
55+ const idp = name . toLowerCase ( )
56+ return idp in IDP_CONFIG && IDP_CONFIG [ idp ]
5657 }
5758
5859 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments