From 6cbbd0c5150ffdfcb03adaa741f83539cf8f7eff Mon Sep 17 00:00:00 2001 From: GruberViktor <55293739+GruberViktor@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:16:53 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- .../document-detail/document-detail.component.html | 10 +++++----- src-ui/src/app/services/document-list-view.service.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index ff2e30d6e..19403b9e4 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -34,22 +34,22 @@  More like this -
- -
diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts index 70d8a19df..4455520f6 100644 --- a/src-ui/src/app/services/document-list-view.service.ts +++ b/src-ui/src/app/services/document-list-view.service.ts @@ -265,7 +265,7 @@ export class DocumentListViewService { hasPrevious(doc: number) { if (this.documents) { let index = this.documents.findIndex(d => d.id == doc) - return !(index == 0 && this.currentPage == 1) + return index != -1 && !(index == 0 && this.currentPage == 1) } }