Skip to content

Commit

Permalink
Properly replace all template values
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Nov 26, 2024
1 parent 214d861 commit 200d171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/VersionHistory/getFieldLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const getFieldLabels = (intl, paths, labelsMap = {}, hiddenFields = []) =

return paths.reduce((acc, path) => {
const fieldLabel = labelsMapEntries.find(([fieldPath]) => {
const regex = new RegExp(`^${escapeRegExp(fieldPath).replace('\\\\d', '\\d')}$`);
const regex = new RegExp(`^${escapeRegExp(fieldPath).replaceAll('\\\\d', '\\d')}$`);

return regex.test(path);
})?.[1] || path;
Expand Down

0 comments on commit 200d171

Please sign in to comment.