From 2ad2be011f7c3c0d16ecd78efbd212cff13a3a15 Mon Sep 17 00:00:00 2001 From: Julien Schneider Date: Fri, 26 Jan 2024 09:15:52 +0100 Subject: [PATCH] fix: advanced search number of results bug (#1388) --- .../app/workspace/results/list-view/list-view.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dsp-app/src/app/workspace/results/list-view/list-view.component.ts b/apps/dsp-app/src/app/workspace/results/list-view/list-view.component.ts index e523d86664..54b6d015f4 100644 --- a/apps/dsp-app/src/app/workspace/results/list-view/list-view.component.ts +++ b/apps/dsp-app/src/app/workspace/results/list-view/list-view.component.ts @@ -319,7 +319,9 @@ export class ListViewComponent implements OnChanges, OnInit, OnDestroy { : this._store.select(OntologyClassSelectors.classItems).pipe( take(1), map(classItems => { - this.numberOfAllResults = classItems[this.search.classId].classItemsCount; + this.numberOfAllResults = classItems[this.search.classId] + ? classItems[this.search.classId].classItemsCount + : 0; this.currentRangeEnd = this.numberOfAllResults > 25 ? 25 : this.numberOfAllResults; if (this.numberOfAllResults === 0) { this._notification.openSnackBar('No resources to display.');