[CST-4879] TypeError fixed

This commit is contained in:
Davide Negretti
2021-12-21 11:17:12 +01:00
parent 7218c450e6
commit d246965cfb

View File

@@ -243,12 +243,12 @@ export class SubmissionSectionUploadFileEditComponent implements OnInit {
const endDateControl: FormControl = control.parent.get('endDate') as FormControl; const endDateControl: FormControl = control.parent.get('endDate') as FormControl;
// Clear previous state // Clear previous state
startDateControl.markAsUntouched(); startDateControl?.markAsUntouched();
endDateControl.markAsUntouched(); endDateControl?.markAsUntouched();
startDateControl.setValue(null); startDateControl?.setValue(null);
control.parent.markAsDirty(); control.parent.markAsDirty();
endDateControl.setValue(null); endDateControl?.setValue(null);
if (showGroups) { if (showGroups) {
if (accessCondition.hasStartDate) { if (accessCondition.hasStartDate) {