Skip to content

Commit

Permalink
feat(@dpc-sdp/ripple-tide-search): ✨ enable untyped search results
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingallday committed Aug 2, 2023
1 parent 7af1f68 commit a493aa7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const searchResultsMappingFn = (item): TideSearchListingResultItem => {
if (props.page.results.item) {
for (const key in props.page.results.item) {
const mapping = props.page.results.item[key]
if (item._source?.type[0] === key || key === '*') {
if (!item._source?.type || item._source?.type[0] === key || key === '*') {
/* If there is no type, a component will be required */
return {
id: item._id,
component: mapping.component,
Expand Down

0 comments on commit a493aa7

Please sign in to comment.