diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index a51388cae5b6..32739b891549 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -430,7 +430,12 @@ function getPersonalPolicy() { } function getAdminEmployees(policy: OnyxEntry): PolicyEmployee[] { - return Object.values(policy?.employeeList ?? {}).filter((employee) => employee.role === CONST.POLICY.ROLE.ADMIN); + if (!policy || !policy.employeeList) { + return []; + } + return Object.keys(policy.employeeList) + .map((email) => ({...policy.employeeList?.[email], email})) + .filter((employee) => employee.role === CONST.POLICY.ROLE.ADMIN); } /**