Skip to content

Commit

Permalink
Merge pull request #77 from oramasearch/feature/orm-2213
Browse files Browse the repository at this point in the history
Fix section resultMap callback
  • Loading branch information
rjborba authored Jan 27, 2025
2 parents 386c994 + df9bdfe commit 34ef1ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui-stencil/src/services/SearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export class SearchService {

for (const hit of hits) {
const searchResultWithScore = this.hitToSearchResultParser(hit, resultMap)
const sectionKey = typeof resultMap.section === 'function' ? resultMap.section(hit.document) : resultMap.section
const documentSectionValue = hit.document[sectionKey]
const documentSectionValue =
typeof resultMap.section === 'function' ? resultMap.section(hit.document) : hit.document[resultMap.section]

if (arraySectionMap[documentSectionValue] === undefined) {
perSectionResults.push({
Expand Down

0 comments on commit 34ef1ac

Please sign in to comment.