Skip to content

Commit

Permalink
try without regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien LE MOUILLOUR committed Nov 29, 2023
1 parent 917492c commit e897d4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cmf/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(')', '');
}

/**
Expand Down

0 comments on commit e897d4d

Please sign in to comment.