Correct the resolution of length in _.zip.

This commit is contained in:
John-David Dalton
2014-06-15 09:41:27 -07:00
parent 4ccb3810c2
commit 39bdd37615
3 changed files with 18 additions and 3 deletions

View File

@@ -2026,8 +2026,8 @@
*/
function zip() {
var index = -1,
length = max(pluck(arguments, 'length')),
result = Array(length < 0 ? 0 : length);
length = isArray(length = max(arguments, 'length')) && length.length || 0,
result = Array(length);
while (++index < length) {
result[index] = pluck(arguments, index);