Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 434c1c5

Browse files
charlierudolphdeeg
authored andcommitted
fix(carousel): use proper sort comparison
Fixes #5638 Closes #5702
1 parent 48f62a6 commit 434c1c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/carousel/carousel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ angular.module('ui.bootstrap.carousel', [])
1515
element: element
1616
});
1717
slides.sort(function(a, b) {
18-
return +a.slide.index > +b.slide.index;
18+
return +a.slide.index - +b.slide.index;
1919
});
2020
//if this is the first slide or the slide is set to active, select it
2121
if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) {

0 commit comments

Comments
 (0)