Skip to content

Commit 6061b0a

Browse files
author
Alexandre Laurent
committed
Prevent slide from moving to a new index if the slidebox is not setup yet (fix #4378)
1 parent 3adb7fc commit 6061b0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: js/views/sliderView.js

+5
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ ionic.views.Slider = ionic.views.View.inherit({
124124
// do nothing if already on requested slide
125125
if (index == to) return;
126126

127+
if (!slides) {
128+
index = to;
129+
return;
130+
}
131+
127132
if (browser.transitions) {
128133

129134
var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward

0 commit comments

Comments
 (0)