Skip to content

Commit

Permalink
fix(platform): icon-tab-bar _generateTabBarItems function improvement (
Browse files Browse the repository at this point in the history
…#12581)

Co-authored-by: Mike O'Donnell <[email protected]>
Co-authored-by: deno <[email protected]>
  • Loading branch information
3 people authored Oct 28, 2024
1 parent 1db7a36 commit 2b183ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions libs/platform/icon-tab-bar/icon-tab-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,11 @@ export class IconTabBarComponent implements OnInit, TabList {
flatIndexRef = flatIndexRef || { value: 0 };
return config.map((item, index) => {
const uId = `${indexPrefix}${index}`;
if (!('color' in item)) {
item.color = 'default';
}
item.color = item.color || 'default';
const result: IconTabBarItem = {
...item,
index,
cssClasses: [],
cssClasses: item.color ? [`fd-icon-tab-bar__item--${item.color}`] : [],
uId,
hidden: false,
parentUId,
Expand All @@ -371,9 +369,6 @@ export class IconTabBarComponent implements OnInit, TabList {
uId
)
};
if (item.color) {
result.cssClasses = [`fd-icon-tab-bar__item--${item.color}`];
}
return result;
});
}
Expand Down

0 comments on commit 2b183ba

Please sign in to comment.