Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

fix(empty-postcode-list): fix a bug where an empty postcode list would crash display #759

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

JonathanMontane
Copy link
Contributor

closes #750

Summary
It seems that some records return an empty list of postcodes instead of returning no postcode field at all. This caused issue because we assumed that if the postcode field was present, then the _highlightResult would also be present, which is not true for empty lists.

This PR fixes that by checking for the empty list.

Copy link
Contributor

@raphi raphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JonathanMontane JonathanMontane merged commit a9228a4 into master Apr 1, 2019
@JonathanMontane JonathanMontane deleted the fix/undefined-highlight-postcode branch April 1, 2019 12:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught error when search produces no results: "Cannot read property 'name' of undefined"
2 participants