Fix build issues

This commit is contained in:
2026-05-04 05:04:28 +00:00
parent ccfaf3fd70
commit 6196d33b2a
8 changed files with 56 additions and 33 deletions

View File

@@ -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,
};
});