Skip to content

Commit

Permalink
Allow passed object to be used as string
Browse files Browse the repository at this point in the history
To avoid breaking changes, a String object is created from the tab name value, then the original properties of the tab object are assigned to this new String object. The passed object can now be used as if it were a string.
  • Loading branch information
milesdelliott authored Sep 18, 2018
1 parent cbe0374 commit a724dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/tab-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TabPanel extends Component {
className="components-tab-panel__tab-content"
tabIndex="0"
>
{ this.props.children( selectedTab ) }
{ this.props.children( Object.assign( new String( selectedTab.name ), selectedTab ) ) }
</div>
) }
</div>
Expand Down

0 comments on commit a724dbb

Please sign in to comment.