Improve code climate

pull/7944/head
Wieland Lindenthal 5 years ago
parent 211f0fdf32
commit 81a1999ca5
  1. 9
      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;
}

Loading…
Cancel
Save