Skip to content

Commit

Permalink
Merge pull request #4688 from ewdl/fix-view-slider
Browse files Browse the repository at this point in the history
Prevent slide from moving to a new index if the slidebox is not setup…
  • Loading branch information
mlynch committed Dec 6, 2015
2 parents 60f9403 + 6061b0a commit 1fd48a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/views/sliderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fd48a0

Please sign in to comment.