From 200d171b4e6789808f55592c42611ff62e7f4523 Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Tue, 26 Nov 2024 13:28:24 +0400 Subject: [PATCH] Properly replace all template values --- lib/VersionHistory/getFieldLabels.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VersionHistory/getFieldLabels.js b/lib/VersionHistory/getFieldLabels.js index ecf68752..34e304bd 100644 --- a/lib/VersionHistory/getFieldLabels.js +++ b/lib/VersionHistory/getFieldLabels.js @@ -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;