From eeeee55981b0158e89ead02daea7cf92430df546 Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Wed, 14 Feb 2024 12:30:45 +0100 Subject: [PATCH] Bugfix for span values in search --- client/src/components/Entities.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/Entities.jsx b/client/src/components/Entities.jsx index ede51f37..9ac80cde 100644 --- a/client/src/components/Entities.jsx +++ b/client/src/components/Entities.jsx @@ -117,7 +117,8 @@ export const Entities = ({ const queryLower = newQuery.toLowerCase(); return entities.filter(entity => searchAttributes.some(attr => { const val = valueForSort(attr, entity); - return isEmpty(val) ? false : val.toLowerCase().indexOf(queryLower) > -1 + //When the application is unknown in Manage then the val is a React span child object + return (isEmpty(val) || typeof val !== "string" || val.toLowerCase === undefined) ? false : val.toLowerCase().indexOf(queryLower) > -1; })); };