Fix build issues
This commit is contained in:
@@ -188,11 +188,13 @@ export function getRolesForAction(
|
||||
);
|
||||
|
||||
return startEntries.map((entry) => {
|
||||
const roleDef = template.roles?.[entry.role];
|
||||
const roleDef = template.roles?.[entry.role || ''];
|
||||
const roleObj = typeof roleDef === "object" ? roleDef : null;
|
||||
|
||||
// TODO: This is ugly. Lot of conditionals. Need to take a much closer look at this.
|
||||
return {
|
||||
roleId: entry.role,
|
||||
name: roleObj?.name || entry.role,
|
||||
roleId: entry.role || '',
|
||||
name: roleObj?.name || entry.role || '',
|
||||
description: roleObj?.description,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user