Skip to content

Commit

Permalink
Fix: Cannot read property 'type' of undefined
Browse files Browse the repository at this point in the history
Uncaught TypeError: Cannot read property 'type' of undefined
    at BootstrapTable.js:228
    at forEachSingleChild (ReactChildren.js:49)
    at traverseAllChildrenImpl (traverseAllChildren.js:75)
    at traverseAllChildrenImpl (traverseAllChildren.js:91)
    at traverseAllChildren (traverseAllChildren.js:170)
    at Object.forEachChildren [as forEach] (ReactChildren.js:69)
    at BootstrapTable.initTable (BootstrapTable.js:221)
    at BootstrapTable.initTable (createPrototypeProxy.js:44)
    at BootstrapTable.componentWillReceiveProps (BootstrapTable.js:419)
    at BootstrapTable.componentWillReceiveProps (createPrototypeProxy.js:44)
  • Loading branch information
cedrouck authored Oct 10, 2017
1 parent a04886c commit 048003f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BootstrapTable extends Component {
const nextDataFields = React.Children.map(props.children, column => column.props.dataField);
React.Children.forEach(this.props.children, column => {
const { dataField, filter } = column.props;
if (!nextDataFields.includes(dataField)) {
if (filter && !nextDataFields.includes(dataField)) {
// Clear filter
this.filter.handleFilter(dataField, '', filter.type, filter);
}
Expand Down

0 comments on commit 048003f

Please sign in to comment.