From e897d4d828da6aa39fda810db64d764597efcc5f Mon Sep 17 00:00:00 2001 From: Sebastien LE MOUILLOUR Date: Wed, 29 Nov 2023 12:25:39 +0100 Subject: [PATCH] try without regexp --- packages/cmf/src/settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cmf/src/settings.js b/packages/cmf/src/settings.js index 9f0e1a0d042..b44083b1859 100644 --- a/packages/cmf/src/settings.js +++ b/packages/cmf/src/settings.js @@ -31,8 +31,8 @@ export function generateDefaultViewId(viewId, componentName, componentId) { * @return {String} MyComponent */ export function withoutHOC(componentName) { - const regExp = /[^()]+(?=\)\))/; - return componentName.match(regExp)[0]; + const parts = componentName.split('('); + return parts[parts.length - 1].replaceAll(')', ''); } /**