Skip to content

Commit

Permalink
🐛 less slides than slidesToShow breaks layout(#63, #64)
Browse files Browse the repository at this point in the history
* Fix #63

* ⏪ keep original style behavior

Co-authored-by: jpucheavoristravel <46667382+jpucheavoristravel@users.noreply.github.com>
Co-authored-by: KyuWoo Choi <kyuwoo.choi@gmail.com>
  • Loading branch information
3 people committed Jan 31, 2020
1 parent 89aa8ee commit 38ee822
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SliderTrack.vue
Expand Up @@ -144,7 +144,11 @@ export default {
)
// if slide needs to be precloned or postcloned
if (spec.infinite && spec.fade === false) {
if (
spec.infinite &&
spec.fade === false &&
childrenCount > spec.slidesToShow
) {
let preCloneNo = childrenCount - index
if (
preCloneNo <= getPreClones(spec) &&
Expand Down

0 comments on commit 38ee822

Please sign in to comment.