Skip to content

Commit

Permalink
FIX (item): fix exception where item not properly null checked
Browse files Browse the repository at this point in the history
  • Loading branch information
sanusart committed Feb 28, 2019
1 parent f16e4a0 commit 9a81547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Item extends Component {

componentDidUpdate() {
if (this.props.state.cursor === this.props.itemIndex) {
this.item.current.scrollIntoView(false);
this.item.current && this.item.current.scrollIntoView(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
filename: 'react-dropdown-select.js',
library: 'Select',
libraryTarget: 'umd',
globalObject: 'this'
umdNamedDefine: true
},
optimization: {
minimizer: [
Expand Down

0 comments on commit 9a81547

Please sign in to comment.