From 5aecf265f38d9e5e03ef4ec616a9df55c75b8bb3 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 2 Jul 2021 13:31:44 +0300 Subject: [PATCH] refactor(docs-infra): simplify condition for determining sidenav mode (#42747) Previously, the `AppComponent#showTopMenu` property was taken into account when determining the `MatSidenav#mode` value. However, this was redundant, because in the only case in which the use of `showTopMenu` would make a difference (i.e. when `dockSideNav` was true and `isSideNavDoc` was false) the sidenav would be closed and the hamburger menu button would not be visible (thus there would be no way to open it manually). This commit simplifies the condition for determining the sidenav mode by removing `showTopMenu` from the expression. PR Close #42747 --- aio/src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/src/app/app.component.ts b/aio/src/app/app.component.ts index c90c41d5c8..f36b6d77e4 100644 --- a/aio/src/app/app.component.ts +++ b/aio/src/app/app.component.ts @@ -79,7 +79,7 @@ export class AppComponent implements OnInit { private currentUrl: string; get isOpened() { return this.dockSideNav && this.isSideNavDoc; } - get mode() { return this.dockSideNav && (this.isSideNavDoc || this.showTopMenu) ? 'side' : 'over'; } + get mode() { return this.isOpened ? 'side' : 'over'; } // Search related properties showSearchResults = false;