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

Improve code climate

Wieland Lindenthal81a1999ca565
diff --git a/frontend/src/app/components/main-menu/main-menu-toggle.service.ts b/frontend/src/app/components/main-menu/main-menu-toggle.service.ts
index 47af2972765..bb00c42edfa 100644
--- a/frontend/src/app/components/main-menu/main-menu-toggle.service.ts
+++ b/frontend/src/app/components/main-menu/main-menu-toggle.service.ts
@@ -66,7 +66,7 @@ export class MainMenuToggleService {
}
public initializeMenu():void {
- if (!this.mainMenu) return;
+ if (!this.mainMenu) { return; }
this.elementWidth = parseInt(window.OpenProject.guardedLocalStorage(this.localStorageKey) as string);
@@ -77,7 +77,7 @@ export class MainMenuToggleService {
}
let currentProject:CurrentProjectService = this.injector.get(CurrentProjectService);
- if (jQuery(document.body).hasClass('controller-my') && this.elementWidth == 0 || currentProject.id === null) {
+ if (jQuery(document.body).hasClass('controller-my') && this.elementWidth === 0 || currentProject.id === null) {
this.saveWidth(this.defaultWidth);
}
@@ -122,9 +122,8 @@ export class MainMenuToggleService {
public closeWhenOnMobile():void {
if (this.deviceService.isMobile) {
- this.closeMenu()
+ this.closeMenu();
}
- ;
}
private setToggleTitle():void {
@@ -144,7 +143,7 @@ export class MainMenuToggleService {
// Leave a minimum amount of space for space fot the content
let maxMenuWidth = window.innerWidth - 520;
- if (width != undefined && width > maxMenuWidth) {
+ if (width !== undefined && width > maxMenuWidth) {
width = maxMenuWidth;
}