Skip to content

Commit 048003f

Browse files
authored
Fix: Cannot read property 'type' of undefined
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)
1 parent a04886c commit 048003f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapTable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BootstrapTable extends Component {
6262
const nextDataFields = React.Children.map(props.children, column => column.props.dataField);
6363
React.Children.forEach(this.props.children, column => {
6464
const { dataField, filter } = column.props;
65-
if (!nextDataFields.includes(dataField)) {
65+
if (filter && !nextDataFields.includes(dataField)) {
6666
// Clear filter
6767
this.filter.handleFilter(dataField, '', filter.type, filter);
6868
}

0 commit comments

Comments
 (0)