fix: updated optional fields check based on updated response (#1055)
This commit is contained in:
committed by
GitHub
parent
a35a1d1ba6
commit
37e811d7e5
@@ -2,7 +2,9 @@ import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } fr
|
||||
import { COMPLETE_STATE, FAILURE_STATE, PENDING_STATE } from '../../data/constants';
|
||||
|
||||
export const defaultState = {
|
||||
fieldDescriptions: {},
|
||||
fieldDescriptions: {
|
||||
fields: {},
|
||||
},
|
||||
optionalFields: {
|
||||
fields: {},
|
||||
extended_profile: [],
|
||||
|
||||
@@ -296,7 +296,7 @@ const RegistrationPage = (props) => {
|
||||
optionalFields={optionalFields}
|
||||
registrationEmbedded={registrationEmbedded}
|
||||
redirectToProgressiveProfilingPage={
|
||||
getConfig().ENABLE_PROGRESSIVE_PROFILING_ON_AUTHN && Object.keys(optionalFields).includes('fields')
|
||||
getConfig().ENABLE_PROGRESSIVE_PROFILING_ON_AUTHN && !!Object.keys(optionalFields.fields).length
|
||||
}
|
||||
/>
|
||||
{autoSubmitRegForm && !errorCode.type ? (
|
||||
|
||||
@@ -627,7 +627,9 @@ describe('RegistrationPage', () => {
|
||||
},
|
||||
commonComponents: {
|
||||
...initialState.commonComponents,
|
||||
optionalFields: {},
|
||||
optionalFields: {
|
||||
fields: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
delete window.location;
|
||||
|
||||
Reference in New Issue
Block a user