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 a9b7d5419..1bbcca38e 100644 --- a/src-ui/src/app/services/document-list-view.service.ts +++ b/src-ui/src/app/services/document-list-view.service.ts @@ -111,7 +111,8 @@ export class DocumentListViewService { this.isReloading = false }, error => { - if (error.error['detail'] == 'Invalid page.') { + if (this.currentPage != 1 && error.status == 404) { + // this happens when applying a filter: the current page might not be available anymore due to the reduced result set. this.currentPage = 1 this.reload() }