Switched on the @typescript-eslint/no-non-null-assertion rule in eslint.
Fixed the errors it threw up.
This commit is contained in:
@@ -145,10 +145,12 @@ export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
|
||||
const formValue = this.form.value;
|
||||
this.info.startDate = moment(formValue.startDate).format('DD-MMM-YYYY');
|
||||
this.info.finishDate = moment(formValue.finishDate).format('DD-MMM-YYYY');
|
||||
const array = this.form.value.attendances!;
|
||||
this.info.body.forEach((item, index) => {
|
||||
item.attendanceType.id = array[index].attendanceType!;
|
||||
});
|
||||
const array = this.form.value.attendances;
|
||||
if (array) {
|
||||
this.info.body.forEach((item, index) => {
|
||||
item.attendanceType.id = array[index].attendanceType ?? 0;
|
||||
});
|
||||
}
|
||||
return this.info;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user