We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aae5133 commit 5292d41Copy full SHA for 5292d41
frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogView.tsx
@@ -155,7 +155,7 @@ const CatalogView: React.FC<CatalogViewProps> = ({
155
const otherCategory = { id: OTHER_CATEGORY, label: t('console-shared~Other') };
156
const sortedCategories = (categories ?? [])
157
.filter((cat) => cat && cat.id !== ALL_CATEGORY && cat.id !== OTHER_CATEGORY)
158
- .sort((a, b) => a.label.localeCompare(b.label));
+ .sort((a, b) => (a.label ?? '').localeCompare(b.label ?? '') ?? 0);
159
return [allCategory, ...sortedCategories, otherCategory];
160
}, [categories, t]);
161
0 commit comments