From 3a4b1c2c855a0439ae50a854023b2ff93b911e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Fri, 27 Mar 2020 11:23:04 +0100 Subject: [PATCH] Carousel: Fix dispatch default parameter value --- src/organisms/Carousel.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/organisms/Carousel.svelte b/src/organisms/Carousel.svelte index a83e8a6..aa40d42 100644 --- a/src/organisms/Carousel.svelte +++ b/src/organisms/Carousel.svelte @@ -53,7 +53,7 @@ } // Send current photo to event - const sendCurrentPhoto = ({ init = false }) => { + const sendCurrentPhoto = (init = false) => { dispatch('photoChange', { currentPhoto: photos[currentIndex], init @@ -102,7 +102,7 @@ animateIn(scope) } - // Hover function + // Controls hover hover = event => { const button = event.currentTarget.querySelector('button') const photoActive = document.querySelector('.gallery__photo--active')