Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Avoid requesting projects when no groups found

Oliver Günther8fa66f2dc896
diff --git a/frontend/src/app/features/in-app-notifications/center/menu/state/ian-menu.service.ts b/frontend/src/app/features/in-app-notifications/center/menu/state/ian-menu.service.ts
index 30c500178ee..8a29dc1f0c6 100644
--- a/frontend/src/app/features/in-app-notifications/center/menu/state/ian-menu.service.ts
+++ b/frontend/src/app/features/in-app-notifications/center/menu/state/ian-menu.service.ts
@@ -62,7 +62,11 @@ export class IanMenuService {
notificationsByProject: data.groups,
projectsFilter,
});
- this.projectsResourceService.fetchProjects(projectsFilter).subscribe();
+
+ // Only request if there are any groups
+ if (data.groups && data.groups.length > 0) {
+ this.projectsResourceService.fetchProjects(projectsFilter).subscribe();
+ }
});
this.ianResourceService.fetchNotifications(IAN_MENU_REASON_FILTERS)
// eslint-disable-next-line @typescript-eslint/no-unsafe-return