Skip to content

Commit

Permalink
feat(controller): support updated loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Dec 22, 2022
1 parent e73b577 commit 03d9895
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/pagination/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ export default function Pagination({ swiper, extendParams, on, emit }) {

function setSideBullets(bulletEl, position) {
const { bulletActiveClass } = swiper.params.pagination;
bulletEl = bulletEl.nextElementSibling;
if (!bulletEl) return;
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
if (bulletEl) {
bulletEl.classList.add(`${bulletActiveClass}-${position}`);
bulletEl = bulletEl.nextElementSibling;
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
if (bulletEl) {
bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);
}
Expand Down

0 comments on commit 03d9895

Please sign in to comment.