Skip to content

Commit

Permalink
fix spread in math.max and default value for Number parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Pin Lin committed Dec 29, 2016
1 parent 11e9daa commit 7e88e15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TableHeader.js
Expand Up @@ -32,8 +32,9 @@ class TableHeader extends Component {
'table-condensed': this.props.condensed
}, this.props.tableHeaderClass);

const rowCount = Math.max(React.Children.map(this.props.children, elm =>
Number(elm.props.row)));
const rowCount = Math.max(...React.Children.map(this.props.children, elm =>
elm.props.row ? Number(elm.props.row) : 0
));

const rows = [];
let rowKey = 0;
Expand Down

0 comments on commit 7e88e15

Please sign in to comment.