From: Bill Erickson Date: Fri, 1 Jun 2018 20:35:28 +0000 (-0400) Subject: LP#1626157 avoid some quick nav errors X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=449842b5136c91aecd468215e318b790e4ab7332;p=working%2FEvergreen.git LP#1626157 avoid some quick nav errors Signed-off-by: Bill Erickson --- 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