Skip to content

Commit

Permalink
🐛 Fix swiperRef for Vue swiperSlide
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawidpol committed Aug 24, 2022
1 parent 82cb4f6 commit 6d43cb3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/vue/swiper-slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SwiperSlide = {
}

onMounted(() => {
if (!swiperRef.value) return;
if (!swiperRef || !swiperRef.value) return;
swiperRef.value.on('_slideClass', updateClasses);
eventAttached = true;
});
Expand Down Expand Up @@ -86,13 +86,13 @@ const SwiperSlide = {
},
props.zoom
? h(
'div',
{
class: 'swiper-zoom-container',
'data-swiper-zoom': typeof props.zoom === 'number' ? props.zoom : undefined,
},
slots.default && slots.default(slideData.value),
)
'div',
{
class: 'swiper-zoom-container',
'data-swiper-zoom': typeof props.zoom === 'number' ? props.zoom : undefined,
},
slots.default && slots.default(slideData.value),
)
: slots.default && slots.default(slideData.value),
);
};
Expand Down

0 comments on commit 6d43cb3

Please sign in to comment.