Signed-off-by: Bill Erickson <berickxx@gmail.com>
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
+ }
+ }
)
);
});
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