Skip to content

Commit d7b0414

Browse files
committed
refactor: improve part reference
1 parent b91899e commit d7b0414

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
@@ -205,8 +205,8 @@ export const applyComponentTheme = (element: HTMLElement): void => {
205205
// Convert 'ION-CHIP' to 'ion-chip' and split into parts
206206
const parts = element.tagName.toLowerCase().split('-');
207207

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

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

0 commit comments

Comments
 (0)