Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
molovo committed Feb 8, 2019
1 parent 6eb159f commit 728881e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bind, debounce } from 'decko'
import { bind } from 'decko'

/**
* A tiny JavaScript carousel
Expand Down Expand Up @@ -83,15 +83,15 @@ export default class MagicRoundabout {
if (this.opts.loop && this.opts.duplicateSlidesWhenLooping) {
this.duplicatesAppend = this.slides.slice(0, this.opts.duplicateSlidesCount).map(slide => slide.cloneNode(true))
for (let i = 0; i < this.duplicatesAppend.length; i++) {
const duplicate = this.duplicatesAppend[i];
const duplicate = this.duplicatesAppend[i]
duplicate.classList.add('slideshow__slide--duplicate')
duplicate.dataset.index = parseInt(duplicate.dataset.index) + this.slides.length
this.wrapper.appendChild(duplicate)
}

this.duplicatesPrepend = this.slides.slice(0 - this.opts.duplicateSlidesCount).map(slide => slide.cloneNode(true))
for (let j = this.duplicatesPrepend.length - 1; j >= 0; j--) {
const duplicate = this.duplicatesPrepend[j];
const duplicate = this.duplicatesPrepend[j]
duplicate.classList.add('slideshow__slide--duplicate')
duplicate.dataset.index = parseInt(duplicate.dataset.index) - this.slides.length
this.wrapper.insertBefore(duplicate, this.wrapper.childNodes[0])
Expand Down Expand Up @@ -501,7 +501,6 @@ export default class MagicRoundabout {
return 0
})()


if (Math.abs(distance) > threshold) {
if (distance > 0) {
this._current = this._current + 1
Expand Down

0 comments on commit 728881e

Please sign in to comment.