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

Deal with no open dropdowns

Oliver Güntherdd98d3dd3a41
diff --git a/frontend/src/app/core/top-menu/top-menu.service.ts b/frontend/src/app/core/top-menu/top-menu.service.ts
index 4f266658200..227095b0886 100644
--- a/frontend/src/app/core/top-menu/top-menu.service.ts
+++ b/frontend/src/app/core/top-menu/top-menu.service.ts
@@ -130,7 +130,7 @@ export class TopMenuService {
}
wrapper.addEventListener('click', (evt) => {
- if (this.menuIsOpen && !this.openDropdowns()[0].contains(evt.target as HTMLElement)) {
+ if (this.menuIsOpen && !this.openDropdowns()[0]?.contains(evt.target as HTMLElement)) {
this.close();
}
}, true);