Prevent error by safely accessing bucket creator with optional chaining
This commit is contained in:
parent
2a5e075db5
commit
8c66a9a083
@ -126,8 +126,8 @@ const EmployeeList = ({ employees, onChange, bucket }) => {
|
||||
className="form-check-input me-3 mt-1"
|
||||
type="checkbox"
|
||||
checked={isChecked(employee.id)}
|
||||
onChange={() => handleCheckboxChange(employee.id)}
|
||||
disabled={bucket.createdBy.id === employee.id}
|
||||
onChange={() => handleCheckboxChange(employee?.id)}
|
||||
disabled={bucket?.createdBy?.id === employee?.id}
|
||||
/>
|
||||
|
||||
<Avatar
|
||||
|
Loading…
x
Reference in New Issue
Block a user