From 79029a6e7dd819ab03204e43cbc031f4c714a62b Mon Sep 17 00:00:00 2001 From: Pinaki Bhattacharjee Date: Thu, 1 Aug 2024 01:32:38 +0530 Subject: [PATCH] Incomplete string escaping --- .../dataset/profile/schema/utils/translateFieldPathSegment.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datahub-web-react/src/app/entity/dataset/profile/schema/utils/translateFieldPathSegment.tsx b/datahub-web-react/src/app/entity/dataset/profile/schema/utils/translateFieldPathSegment.tsx index 7153a38a32c3b5..734580eb26f5dd 100644 --- a/datahub-web-react/src/app/entity/dataset/profile/schema/utils/translateFieldPathSegment.tsx +++ b/datahub-web-react/src/app/entity/dataset/profile/schema/utils/translateFieldPathSegment.tsx @@ -28,7 +28,7 @@ export default function translateFieldPathSegment(fieldPathSegment, i, fieldPath // structs that qualify a union are represented as [union]union_field.[type=QualifiedStruct].qualified_struct_field // we convert into union_field. (QualifiedStruct) qualified_struct_field if (fieldPathSegment.startsWith('[type=') && fieldPathSegment.endsWith(']')) { - const typeName = fieldPathSegment.replace('[type=', '').replace(']', ''); + const typeName = fieldPathSegment.replace(/\[type=/g, '').replace(/\]/g, ''); // if the qualified struct is the last element, just show the qualified struct if (i === fieldPathParts.length - 1) { return ` ${typeName}`;