Skip to content

Commit

Permalink
scrollbar: check for target
Browse files Browse the repository at this point in the history
Fixes #4043
  • Loading branch information
nolimits4web committed Jan 25, 2021
1 parent 240d25e commit 1c29964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/scrollbar/scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const Scrollbar = {
support.passiveListener && params.passiveListeners
? { passive: true, capture: false }
: false;
if (!target) return;
if (!support.touch) {
target.addEventListener(
touchEventsDesktop.start,
Expand Down Expand Up @@ -246,6 +247,7 @@ const Scrollbar = {
support.passiveListener && params.passiveListeners
? { passive: true, capture: false }
: false;
if (!target) return;
if (!support.touch) {
target.removeEventListener(
touchEventsDesktop.start,
Expand Down

0 comments on commit 1c29964

Please sign in to comment.