Should coerce float start and end params of _.slice to integers.

This commit is contained in:
jdalton
2015-01-28 23:33:30 -08:00
parent db3b6a1252
commit 2ee0634db3
2 changed files with 4 additions and 3 deletions

View File

@@ -2661,7 +2661,8 @@
if (end < 0) {
end += length;
}
length = start > end ? 0 : (end - start);
length = start > end ? 0 : (end - start) >>> 0;
start >>>= 0;
var result = Array(length);
while (++index < length) {