From b43c2f72ef8c72cf9a245b98f925b01ddb191ad7 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 1 Jun 2018 16:35:28 -0400 Subject: [PATCH] LP#1775466 avoid some quick nav errors Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts | 7 ++++++- Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts index 39369fc9dc..352fd6a4c2 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts @@ -110,7 +110,12 @@ export class EgCatalogService { this.getBibSummary(recId, ctx.searchOrg.id(), depth) .then( // idx maintains result sort order - summary => ctx.result.records[idx] = summary + summary => { + if (ctx.result.records) { + // May be reset when quickly navigating results. + ctx.result.records[idx] = summary + } + } ) ); }); diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts index 039a065487..ad0b2d5ac3 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts @@ -67,7 +67,7 @@ export class ResultsComponent implements OnInit { fleshSearchResults(): void { const records = this.searchContext.result.records; - if (records.length === 0) { return; } + if (!records || records.length === 0) { return; } // Flesh the creator / editor fields with the user object. // Handle the user fleshing here (instead of record.component so -- 2.11.0