Use case-insensitive filters
This commit is contained in:
@@ -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' }]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user