From ae6ea4340893f940d456f40d7db26f4eec94bc32 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Tue, 16 Feb 2021 12:49:02 +0100 Subject: [PATCH] Compare relation type case insensitive --- plugins/catalog-react/src/hooks/useRelatedEntities.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-react/src/hooks/useRelatedEntities.ts b/plugins/catalog-react/src/hooks/useRelatedEntities.ts index b2ab93b607..baf6cf5fc7 100644 --- a/plugins/catalog-react/src/hooks/useRelatedEntities.ts +++ b/plugins/catalog-react/src/hooks/useRelatedEntities.ts @@ -32,9 +32,8 @@ export function useRelatedEntities( entity.relations && entity.relations.filter( r => - (!type || r.type === type) && - (!kind || - r.target.kind.toLocaleLowerCase() === kind.toLocaleLowerCase()), + (!type || r.type.toLowerCase() === type.toLowerCase()) && + (!kind || r.target.kind.toLowerCase() === kind.toLowerCase()), ); if (!relations) {