Skip to content

Commit 2b9e322

Browse files
committed
refactor: improve part reference
1 parent 6938e85 commit 2b9e322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/utils/theme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ export const applyComponentTheme = (element: HTMLElement): void => {
231231
// Convert 'ION-CHIP' to 'ion-chip' and split into parts
232232
const parts = element.tagName.toLowerCase().split('-');
233233

234-
// Remove 'ion-' prefix to get 'chip'
235-
const componentName = parts.slice(1).join('-');
234+
// Get the component name 'chip' from the second part
235+
const componentName = parts[1];
236236

237237
// Convert to 'IonChip' by capitalizing each part
238238
const themeLookupName = parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join('');

0 commit comments

Comments
 (0)