X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fmisc%2Ftop-menu-dropdown.component.ts;h=a8cc9b593fa9d263536eb7f0bac5afba676622a6;hb=21393652621efba8a95715c6f340515d58599ec6;hp=2cafb6c55c6d68f50d17106b7e675afdeb7650b8;hpb=f3081d6401b63da41b03376f9f952bf1cca8303d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts index 2cafb6c55..a8cc9b593 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts @@ -66,7 +66,7 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy { .subscribe(() => this.updateChildLabels(window.location.pathname)) this.hasIcons = this.menuEntries.some( - e => e.children && e.children.some(c => !!c.iconName) + e => e.children?.some(c => !!c.iconName) ) } @@ -84,8 +84,9 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy { this.modalService.open(this.modal, { centered: true, - beforeDismiss: async () => { + beforeDismiss: () => { this.onModalDismiss() + return true } })