Skip to content

Commit

Permalink
Incomplete string escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
pinakipb2 committed Jul 31, 2024
1 parent e83550b commit 79029a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down

0 comments on commit 79029a6

Please sign in to comment.