Fix selecting nothing #81

Merged
jank merged 2 commits from fix/fix-selecting-nothing-as-skill into main 2025-01-22 11:17:44 +00:00
Showing only changes of commit 2e9b48be7c - Show all commits

View file

@ -55,6 +55,9 @@ export class QualifikationFormComponent {
addEmployee() { addEmployee() {
const employeeId = Number(this.skillForm.get("newEmployee")?.value); const employeeId = Number(this.skillForm.get("newEmployee")?.value);
if (!employeeId) {
return;
}
const employee = this.addableEmployees.find(emp => emp.id === employeeId); const employee = this.addableEmployees.find(emp => emp.id === employeeId);
if (employee) { if (employee) {