diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index f8617ba4b2..18080bb7b0 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -65,21 +65,12 @@ const YellowStar = withStyles({ const refCompare = (a: Entity, b: Entity) => { const toRef = (entity: Entity) => - entity.metadata.title?.toLocaleLowerCase('en-US') || + entity.metadata.title || humanizeEntityRef(entity, { defaultKind: 'Component', - }).toLocaleLowerCase('en-US'); + }); - const aRef = toRef(a); - const bRef = toRef(b); - - if (aRef < bRef) { - return -1; - } - if (aRef > bRef) { - return 1; - } - return 0; + return toRef(a).localeCompare(toRef(b)); }; /** @public */