Skip to content

Commit

Permalink
fix(pagination): check for bullets before destroy
Browse files Browse the repository at this point in the history
fixes #4859
  • Loading branch information
nolimits4web committed Aug 26, 2021
1 parent dda14bc commit ea06b4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/pagination/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ export default function Pagination({ swiper, extendParams, on, emit }) {
$el.removeClass(params.hiddenClass);
$el.removeClass(params.modifierClass + params.type);
$el.removeClass(params.modifierClass + swiper.params.direction);
if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass)
swiper.pagination.bullets.removeClass(params.bulletActiveClass);
if (params.clickable) {
$el.off('click', classesToSelector(params.bulletClass));
}
Expand Down

0 comments on commit ea06b4c

Please sign in to comment.