Skip to content

Commit

Permalink
Fix primefaces#5477: ComponentBase fkey refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jan 9, 2024
1 parent 9056925 commit 87c92d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/lib/componentbase/ComponentBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,13 @@ export const ComponentBase = {
obj = obj.pt;
}

const originalkey = ObjectUtils.toFlatCase(key);
const originalkey = key;
const isNestedParam = /./g.test(originalkey) && !!params[originalkey.split('.')[0]];
const fkey = isNestedParam ? ObjectUtils.toFlatCase(originalkey.split('.')[1]) : ObjectUtils.toFlatCase(originalkey);
const hostName = params.hostName && ObjectUtils.toFlatCase(params.hostName);
const componentName = hostName || (params.props && params.props.__TYPE && ObjectUtils.toFlatCase(params.props.__TYPE)) || '';
const isNestedParam = /./g.test(originalkey) && !!params[originalkey.split('.')[0]];
const isTransition = fkey === 'transition' || (/./g.test(originalkey) && !!(originalkey.split('.')[1] === 'transition'));
const isTransition = fkey === 'transition';
const datasetPrefix = 'data-pc-';
const fkey = isNestedParam ? ObjectUtils.toFlatCase(originalkey.split('.')[1]) : originalkey;

const getHostInstance = (params) => {
return params?.props ? (params.hostName ? (params.props.__TYPE === params.hostName ? params.props : getHostInstance(params.parent)) : params.parent) : undefined;
Expand Down

0 comments on commit 87c92d6

Please sign in to comment.