Skip to content

Commit

Permalink
Swiper.destroy - fix for multi invocation of detachEvents() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Triloworld committed Apr 25, 2018
1 parent 56134c5 commit e04796c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/core/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ function detachEvents() {

const { params, touchEvents, el, wrapperEl } = swiper;

if(typeof params === 'undefined'){
return true
}

const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
const capture = !!params.nested;

Expand Down

0 comments on commit e04796c

Please sign in to comment.