Carousel: Fix dispatch default parameter value
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-27 11:23:04 +01:00
parent af53f4240f
commit 3a4b1c2c85

View File

@@ -53,7 +53,7 @@
} }
// Send current photo to event // Send current photo to event
const sendCurrentPhoto = ({ init = false }) => { const sendCurrentPhoto = (init = false) => {
dispatch('photoChange', { dispatch('photoChange', {
currentPhoto: photos[currentIndex], currentPhoto: photos[currentIndex],
init init
@@ -102,7 +102,7 @@
animateIn(scope) animateIn(scope)
} }
// Hover function // Controls hover
hover = event => { hover = event => {
const button = event.currentTarget.querySelector('button') const button = event.currentTarget.querySelector('button')
const photoActive = document.querySelector('.gallery__photo--active') const photoActive = document.querySelector('.gallery__photo--active')