Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
fix: onGlobalWheel contains
Browse files Browse the repository at this point in the history
  • Loading branch information
wwayne committed Jun 16, 2021
1 parent 4535203 commit 2174795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class HorizontalScroll extends Component {
}

onGlobalWheel (e) {
if (this.wrapperRef && this.wrapperRef.current.contains(e.target)) {
if (this.wrapperRef && this.wrapperRef.current && this.wrapperRef.current.contains(e.target)) {
e.preventDefault()
}
}
Expand Down

0 comments on commit 2174795

Please sign in to comment.