From 9000236c25a3bd6dedd886374c1753e8e472c9f6 Mon Sep 17 00:00:00 2001 From: vibby Date: Wed, 25 Jun 2014 15:38:30 +0200 Subject: [PATCH] Update VMM.Slider.js Fix bug when reload introduce less data than previously Steps to reproduce * init with 10 dates * go to 10th date * reload with 9 dates --- source/js/Core/Slider/VMM.Slider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/js/Core/Slider/VMM.Slider.js b/source/js/Core/Slider/VMM.Slider.js index 8b49267..b4e4681 100644 --- a/source/js/Core/Slider/VMM.Slider.js +++ b/source/js/Core/Slider/VMM.Slider.js @@ -189,7 +189,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Lib.width($slides_items, (slides.length * config.slider.content.width)); - if (_from_start) { + if (_from_start && slides[current_slide] != undefined) { VMM.Lib.css($slider_container, "left", slides[current_slide].leftpos()); }