Apply suggestions from code review

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
GruberViktor
2022-03-11 20:16:53 +01:00
committed by GitHub
parent 0975c02635
commit 6a26c8f4a5
2 changed files with 6 additions and 6 deletions

View File

@@ -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)
}
}