Skip to content

Commit

Permalink
MBS-12890: Show disambiguation in label/genre autocompletes (#2834)
Browse files Browse the repository at this point in the history
We were showing only the name for labels and genres, but running it
through formatGeneric will give them the bare minimum that
they should have as well: disambiguation and primary alias when relevant
  • Loading branch information
reosarevok authored Feb 14, 2023
1 parent 50e5d6b commit a51a967
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function formatName<+T: EntityItemT>(entity: T) {
function formatGeneric(
entity: | ArtistT
| EventT
| GenreT
| InstrumentT
| LabelT
| PlaceT
| ReleaseT
| WorkT,
Expand Down Expand Up @@ -538,12 +540,18 @@ export default function formatItem<+T: EntityItemT>(
case 'event':
return formatEvent(entity);

case 'genre':
return formatGeneric(entity);

case 'instrument':
return formatInstrument(
entity,
options?.showDescriptions,
);

case 'label':
return formatGeneric(entity);

case 'link_attribute_type':
return formatLinkAttributeType(
entity,
Expand Down

0 comments on commit a51a967

Please sign in to comment.