Fix the Underscore build of _.random.

This commit is contained in:
John-David Dalton
2014-03-13 01:27:22 -07:00
parent e51602ccfa
commit 7e04c9a909
2 changed files with 3 additions and 3 deletions

View File

@@ -4961,12 +4961,12 @@
if (min == null && max == null) {
max = 1;
}
min |= 0;
min = +min || 0;
if (max == null) {
max = min;
min = 0;
} else {
max |= 0;
max = +max || 0;
}
return min + floor(nativeRandom() * (max - min + 1));
}