diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 6e0e51300..308e499a4 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -167,7 +167,11 @@ export class DocumentDetailComponent implements OnInit { close() { this.openDocumentService.closeDocument(this.document) - this.router.navigate(['documents']) + if (this.documentListViewService.viewConfig) { + this.router.navigate(['view', this.documentListViewService.viewConfig.id]) + } else { + this.router.navigate(['documents']) + } } delete() {