From bd11d3a34f4bcc33e13302cd26097647c6964fe2 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sat, 27 Feb 2021 11:24:58 +0100 Subject: [PATCH] small changes --- .../src/app/components/app-frame/app-frame.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts index 91177fc54..e360e7567 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.ts @@ -81,12 +81,11 @@ export class AppFrameComponent implements OnInit { this.closeMenu() this.openDocumentsService.closeDocument(d) - // TODO: is there a better way to do this? (taken from closeAll) - let route = this.activatedRoute + let route = this.activatedRoute.snapshot while (route.firstChild) { route = route.firstChild } - if (route.component == DocumentDetailComponent && (route.params as BehaviorSubject).getValue()['id'] == d.id) { + if (route.component == DocumentDetailComponent && route.params['id'] == d.id) { this.router.navigate([""]) } } @@ -95,8 +94,7 @@ export class AppFrameComponent implements OnInit { this.closeMenu() this.openDocumentsService.closeAll() - // TODO: is there a better way to do this? - let route = this.activatedRoute + let route = this.activatedRoute.snapshot while (route.firstChild) { route = route.firstChild }