fix: Added checks to ensure that the configs are valid before starting eval (#8019)
This commit is contained in:
parent
d6ca1140f6
commit
8d6aa6a848
|
|
@ -96,12 +96,24 @@ function* getFormEvaluation(formId: string, actionConfiguration: any): any {
|
||||||
function* setFormEvaluationSaga(type: string, payload: any) {
|
function* setFormEvaluationSaga(type: string, payload: any) {
|
||||||
if (type === ReduxActionTypes.INIT_FORM_EVALUATION) {
|
if (type === ReduxActionTypes.INIT_FORM_EVALUATION) {
|
||||||
finalEvalObj = {};
|
finalEvalObj = {};
|
||||||
|
if (
|
||||||
|
"editorConfig" in payload &&
|
||||||
|
!!payload.editorConfig &&
|
||||||
|
payload.editorConfig.length > 0
|
||||||
|
) {
|
||||||
payload.editorConfig.forEach((config: any) => {
|
payload.editorConfig.forEach((config: any) => {
|
||||||
generateInitialEvalState(config);
|
generateInitialEvalState(config);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
"settingConfig" in payload &&
|
||||||
|
!!payload.settingConfig &&
|
||||||
|
payload.settingConfig.length > 0
|
||||||
|
) {
|
||||||
payload.settingConfig.forEach((config: any) => {
|
payload.settingConfig.forEach((config: any) => {
|
||||||
generateInitialEvalState(config);
|
generateInitialEvalState(config);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
yield put({
|
yield put({
|
||||||
type: ReduxActionTypes.SET_FORM_EVALUATION,
|
type: ReduxActionTypes.SET_FORM_EVALUATION,
|
||||||
payload: {
|
payload: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user