Skip to content

Commit

Permalink
Fix issue with additional categories on embed view
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sánchez García <[email protected]>
  • Loading branch information
cynthia-sg committed Jan 20, 2025
1 parent 24405fe commit 3733dc1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ui/webapp/src/utils/itemsDataGetter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,18 @@ export class ItemsDataGetter {
} else {
list[i.category] = [i.subcategory];
}
// Add additional categories
if (i.additional_categories) {
i.additional_categories.forEach((ac: AdditionalCategory) => {
if (list[ac.category]) {
list[ac.category].push(ac.subcategory);
} else {
list[ac.category] = [ac.subcategory];
}
});
}
});

const categories: Category[] = [];
window.baseDS.categories.forEach((c: Category) => {
if (list[c.name]) {
Expand Down

0 comments on commit 3733dc1

Please sign in to comment.