Skip to content

Commit 5c76272

Browse files
126124: submission-forms error mergeMap fix
1 parent 446f681 commit 5c76272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/submission/sections/sections.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import isEqual from 'lodash/isEqual';
1212
import {
1313
combineLatest,
1414
Observable,
15+
switchMap,
1516
} from 'rxjs';
1617
import {
1718
distinctUntilChanged,
1819
filter,
1920
map,
20-
mergeMap,
2121
take,
2222
} from 'rxjs/operators';
2323

@@ -206,7 +206,7 @@ export class SectionsService {
206206
errorsState$ = this.getSectionErrors(submissionId, sectionId);
207207
} else {
208208
errorsState$ = this.getSectionState(submissionId, sectionId, sectionType).pipe(
209-
mergeMap((state: SubmissionSectionObject) => this.formService.getFormErrors(state.formId).pipe(
209+
switchMap((state: SubmissionSectionObject) => this.formService.getFormErrors(state.formId).pipe(
210210
map((formErrors: FormError[]) => {
211211
const pathCombiner = new JsonPatchOperationPathCombiner('sections', sectionId);
212212
const sectionErrors = formErrors

0 commit comments

Comments
 (0)