mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Allow _.zipObject to accept an array of keys without assuming its an array of key/value pairs. [closes #397]
This commit is contained in:
3
dist/lodash.underscore.js
vendored
3
dist/lodash.underscore.js
vendored
@@ -3589,6 +3589,9 @@
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
if (!values && length && !isArray(keys[0])) {
|
||||
values = [];
|
||||
}
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
|
||||
Reference in New Issue
Block a user