mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +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.compat.js
vendored
3
dist/lodash.compat.js
vendored
@@ -5317,6 +5317,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