We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6b71dcf + 1391721 commit 6f3d280Copy full SHA for 6f3d280
1 file changed
src/lory.js
@@ -355,6 +355,14 @@ export function lory (slider, opts) {
355
nextCtrl.removeEventListener('click', next);
356
}
357
358
+ // remove cloned slides if infinite is set
359
+ if (options.infinite) {
360
+ Array.apply(null, Array(options.infinite)).forEach(function () {
361
+ slideContainer.removeChild(slideContainer.firstChild);
362
+ slideContainer.removeChild(slideContainer.lastChild);
363
+ });
364
+ }
365
+
366
dispatchSliderEvent('after', 'destroy');
367
368
0 commit comments