Permalink
Browse files

convert array-like to array

  • Loading branch information...
Metin Devekaya
Metin Devekaya committed Jan 9, 2019
1 parent b3cc748 commit c3c9197f7d6277c5207adfc6d5ecc01fa4212a37
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/components/Glide.js
@@ -268,7 +268,10 @@ export default {
* @returns {number} - index of slide
*/
addEventListenerToSlide () {
const slides = document.querySelectorAll('.glide__slide')
let slides = document.querySelectorAll('.glide__slide')

// convert array-like -> array
slides = [].slice.call(slides)

slides.forEach(el => {
el.addEventListener('click', e => {

0 comments on commit c3c9197

Please sign in to comment.