File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ export const initializedState = spec => {
133133 currentSlide,
134134 lazyLoadedList
135135 } ) ;
136- lazyLoadedList . concat ( slidesToLoad ) ;
136+ lazyLoadedList = lazyLoadedList . concat ( slidesToLoad ) ;
137137
138138 let state = {
139139 slideCount,
@@ -161,14 +161,14 @@ export const slideHandler = spec => {
161161 infinite,
162162 index,
163163 slideCount,
164- lazyLoadedList,
165164 lazyLoad,
166165 currentSlide,
167166 centerMode,
168167 slidesToScroll,
169168 slidesToShow,
170169 useCSS
171170 } = spec ;
171+ let { lazyLoadedList } = spec ;
172172 if ( waitForAnimate && animating ) return { } ;
173173 let animationSlide = index ,
174174 finalSlide ,
@@ -185,7 +185,7 @@ export const slideHandler = spec => {
185185 animationSlide = index - slideCount ;
186186 }
187187 if ( lazyLoad && lazyLoadedList . indexOf ( animationSlide ) < 0 ) {
188- lazyLoadedList . push ( animationSlide ) ;
188+ lazyLoadedList = lazyLoadedList . concat ( animationSlide ) ;
189189 }
190190 state = {
191191 animating : true ,
@@ -222,10 +222,11 @@ export const slideHandler = spec => {
222222 if ( animationLeft === finalLeft ) animationSlide = finalSlide ;
223223 animationLeft = finalLeft ;
224224 }
225- lazyLoad &&
226- lazyLoadedList . concat (
225+ if ( lazyLoad ) {
226+ lazyLoadedList = lazyLoadedList . concat (
227227 getOnDemandLazySlides ( { ...spec , currentSlide : animationSlide } )
228228 ) ;
229+ }
229230 if ( ! useCSS ) {
230231 state = {
231232 currentSlide : finalSlide ,
You can’t perform that action at this time.
0 commit comments