Skip to content

Commit

Permalink
2.5.13 filter empty categories
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljonescodes committed Dec 26, 2023
1 parent 05da939 commit 4efab86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/moa-square/services/categories.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export class CategoriesService extends EntityRepositoryService<CategoryEntity> {
);
}

results[0] = results[0].filter(
(category) => (category.items?.length ?? 0) > 0,
);

return buildPaginatedResults({
results,
pagination: {
Expand Down

0 comments on commit 4efab86

Please sign in to comment.