Skip to content

Commit

Permalink
fix(AdaptiveTabs): prevent object convert to string (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
chervyakovru authored Sep 14, 2023
1 parent 5b2ce45 commit 5488f58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/AdaptiveTabs/AdaptiveTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ class Tab extends React.Component<TabProps> {

render() {
const {active, disabled, hint, title = this.props.id} = this.props;
const stringTitle = (hint || typeof title === 'string' ? title : '') as string;
return (
<div
className={b('tab', {active, disabled})}
title={String(hint || title || '')}
title={stringTitle}
onClick={disabled ? undefined : this.onClick}
>
{title}
Expand Down

0 comments on commit 5488f58

Please sign in to comment.