diff --git a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx index e0664d874..29b7ad09f 100644 --- a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx +++ b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx @@ -24,7 +24,7 @@ export default function ShopEmployeeAddVacation({ employee }) { let result; result = await insertVacation({ - variables: { vacation: { ...values, employeeid: employee.id } }, + variables: { vacation: { ...values, employeeid: employee?.id } }, update(cache, { data }) { cache.modify({ id: cache.identify({ id: employee.id, __typename: "employees" }),