diff --git a/plugins/catalog-react/src/filters.ts b/plugins/catalog-react/src/filters.ts index 1bab65ce9a..6c68dad9aa 100644 --- a/plugins/catalog-react/src/filters.ts +++ b/plugins/catalog-react/src/filters.ts @@ -94,13 +94,7 @@ export class EntityTextFilter implements EntityFilter { const partialMatch = this.toUpperArray([ entity.metadata.name, entity.metadata.title, - ...(typeof entity.spec?.profile === 'object' && - entity.spec?.profile !== null && - !Array.isArray(entity.spec.profile) && - 'displayName' in entity.spec.profile && - typeof entity.spec.profile.displayName === 'string' - ? [entity.spec.profile.displayName] - : []), + (entity.spec?.profile as { displayName?: string })?.displayName, ]); for (const word of words) {