Skip to content

Commit

Permalink
Merge pull request #13604 from ethereum/fix-docsearch-transform
Browse files Browse the repository at this point in the history
HOTFIX docsearch transform
  • Loading branch information
wackerow authored Aug 7, 2024
2 parents 36fb786 + 6e71e1e commit 8989da6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ const Search = forwardRef<Props, "button">(
items.map((item: DocSearchHit) => {
const newItem: DocSearchHit = structuredClone(item)
newItem.url = sanitizeHitUrl(item.url)
const newTitle = sanitizeHitTitle(
item._highlightResult.hierarchy.lvl0?.value || ""
)
newItem._highlightResult.hierarchy.lvl0.value = newTitle
const newTitle = sanitizeHitTitle(item.hierarchy.lvl0 || "")
newItem.hierarchy.lvl0 = newTitle
return newItem
})
}
Expand Down

0 comments on commit 8989da6

Please sign in to comment.