Skip to content

Commit 80fb5a6

Browse files
committed
fix TypeError: this.props.children.filter is not a function
1 parent 3b2d8f5 commit 80fb5a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/BootstrapTable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,8 +1271,9 @@ class BootstrapTable extends Component {
12711271
}
12721272
}
12731273
} else {
1274-
React.Children.forEach(this.props.children.filter(_ => !!_), (child, i) => {
1275-
if (child.props.width) {
1274+
// debugger;
1275+
React.Children.forEach(this.props.children, (child, i) => {
1276+
if (child && child.props.width) {
12761277
header[i].style.width = `${child.props.width}px`;
12771278
header[i].style.minWidth = `${child.props.width}px`;
12781279
}

0 commit comments

Comments
 (0)