mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Ensure _.merge doesn't iterate over a passed callback arg.
Former-commit-id: 2ed55922c2f5b4e47ac7e9763f3d76b4bec142da
This commit is contained in:
@@ -1901,9 +1901,11 @@
|
||||
// using their `callback` arguments, `index|key` and `collection`
|
||||
if (typeof deepIndicator != 'number') {
|
||||
length = args.length;
|
||||
callback = typeof (callback = args[length - 2]) == 'function'
|
||||
? createCallback(callback, args[--length], 2)
|
||||
: (typeof (callback = args[length - 1]) == 'function' && callback);
|
||||
if (typeof args[length - 2] == 'function') {
|
||||
callback = createCallback(args[--length - 1], args[length--], 2);
|
||||
} else if (typeof args[length - 1] == 'function') {
|
||||
callback = args[--length];
|
||||
}
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
|
||||
Reference in New Issue
Block a user