Skip to content

Commit

Permalink
0.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
daviferreira committed Apr 30, 2016
1 parent 5237471 commit 68a4862
Show file tree
Hide file tree
Showing 5 changed files with 13,567 additions and 12,767 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -3,4 +3,4 @@ npm-debug.log
*.swp
.DS_Store
**/*-bundle.*.js
demo/bundle.js
demo/bundle.*
7 changes: 7 additions & 0 deletions CHANGES.md
@@ -1,3 +1,10 @@
0.0.11 / 2016-04-30
===================

* Upgrade to React 0.15.2
* Check if this.props.children is an array


0.0.10 / 2016-03-31
===================

Expand Down
11 changes: 11 additions & 0 deletions dist-modules/Accordion/index.js
Expand Up @@ -88,6 +88,17 @@ var Accordion = function (_Component) {
return null;
}

if (!Array.isArray(this.props.children)) {
var expanded = !this.props.disabled && this.state.activeItems.indexOf(0) !== -1;

return _react2.default.cloneElement(this.props.children, {
expanded: expanded,
key: 0,
onClick: this.handleClick.bind(this, 0, this.props.children.props.onClick),
ref: 'item-' + 0
});
}

return this.props.children.map(function (item, index) {
var expanded = _this3.state.activeItems.indexOf(index) !== -1;

Expand Down

0 comments on commit 68a4862

Please sign in to comment.