Skip to content

Commit

Permalink
fix: cannot handle facet summaries for non-grouped references after F…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashornych committed Nov 23, 2023
1 parent 9b5426b commit f5bcdc2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ export abstract class JsonFacetSummaryVisualiserService<VS extends JsonResultVis
if (referenceSchema == undefined) {
throw new UnexpectedError(undefined, `Reference '${referenceName}' not found in entity '${entitySchema.name}'.`)
}
referencesWithGroups.push([referenceSchema, facetSummaryResult[referenceName]])
const groups = facetSummaryResult[referenceName]
if (groups instanceof Array) {
referencesWithGroups.push([referenceSchema, groups])
} else {
referencesWithGroups.push([referenceSchema, [groups]])
}
}
return referencesWithGroups
}
Expand Down

0 comments on commit f5bcdc2

Please sign in to comment.