Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

small changes

jonaswinklerbd11d3a34f4b
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<Params>).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
}