Prevent error by safely accessing bucket creator with optional chaining

This commit is contained in:
Pramod Mahajan 2025-05-29 00:46:58 +05:30
parent 2a5e075db5
commit 8c66a9a083

View File

@ -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