Skip to content

Commit 3b48237

Browse files
committed
Improve U.range(start, stop), update underscore.js with 1.91.
1 parent 68d448c commit 3b48237

File tree

4 files changed

+427
-281
lines changed

4 files changed

+427
-281
lines changed

src/main/java/com/github/underscore/U.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ public static int[] range(int stop) {
14831483
}
14841484

14851485
public static int[] range(int start, int stop) {
1486-
return range(start, stop, 1);
1486+
return range(start, stop, start < stop ? 1 : -1);
14871487
}
14881488

14891489
public static int[] range(int start, int stop, int step) {

0 commit comments

Comments
 (0)