From f346688237dbda1361d7807de469b8759e9bf5f7 Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Tue, 1 Dec 2020 07:55:42 +0100 Subject: [PATCH] Use case-insensitive filters --- plugins/catalog/src/components/getEntityRelations.test.ts | 2 +- plugins/catalog/src/components/getEntityRelations.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog/src/components/getEntityRelations.test.ts b/plugins/catalog/src/components/getEntityRelations.test.ts index 062c6b3064..5b997d646b 100644 --- a/plugins/catalog/src/components/getEntityRelations.test.ts +++ b/plugins/catalog/src/components/getEntityRelations.test.ts @@ -60,7 +60,7 @@ describe('getEntityRelations', () => { } as Entity; expect( - getEntityRelations(entity, RELATION_MEMBER_OF, { kind: 'group' }), + getEntityRelations(entity, RELATION_MEMBER_OF, { kind: 'Group' }), ).toEqual([{ kind: 'group', name: 'member' }]); }); }); diff --git a/plugins/catalog/src/components/getEntityRelations.ts b/plugins/catalog/src/components/getEntityRelations.ts index 5c5531f0dd..f9f526698f 100644 --- a/plugins/catalog/src/components/getEntityRelations.ts +++ b/plugins/catalog/src/components/getEntityRelations.ts @@ -31,7 +31,7 @@ export function getEntityRelations( if (filter?.kind) { entityNames = entityNames?.filter( - e => e.kind.toLowerCase() === filter.kind, + e => e.kind.toLowerCase() === filter.kind.toLowerCase(), ); }