Switched on the @typescript-eslint/no-non-null-assertion rule in eslint.

Fixed the errors it threw up.
This commit is contained in:
2022-07-17 09:17:20 +05:30
parent c76696e022
commit 9f70ec2917
29 changed files with 144 additions and 111 deletions
@@ -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;
}
}