diff --git a/js/views/sliderView.js b/js/views/sliderView.js index 2c57c8291a6..c968ec49d9a 100644 --- a/js/views/sliderView.js +++ b/js/views/sliderView.js @@ -124,6 +124,11 @@ ionic.views.Slider = ionic.views.View.inherit({ // do nothing if already on requested slide if (index == to) return; + if (!slides) { + index = to; + return; + } + if (browser.transitions) { var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward