mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Cleanup createAssigner.
This commit is contained in:
@@ -3219,14 +3219,14 @@
|
|||||||
return restParam(function(object, sources) {
|
return restParam(function(object, sources) {
|
||||||
var index = -1,
|
var index = -1,
|
||||||
length = object == null ? 0 : sources.length,
|
length = object == null ? 0 : sources.length,
|
||||||
customizer = sources[length - 2],
|
customizer = length > 2 && sources[length - 2],
|
||||||
thisArg = sources[length - 1],
|
guard = length > 2 && sources[2],
|
||||||
guard = sources[2];
|
thisArg = length > 1 && sources[length - 1];
|
||||||
|
|
||||||
if (length > 2 && typeof customizer == 'function') {
|
if (typeof customizer == 'function') {
|
||||||
customizer = bindCallback(customizer, thisArg, 5);
|
customizer = bindCallback(customizer, thisArg, 5);
|
||||||
length -= 2;
|
length -= 2;
|
||||||
} else if (length > 1) {
|
} else {
|
||||||
customizer = typeof thisArg == 'function' ? thisArg : null;
|
customizer = typeof thisArg == 'function' ? thisArg : null;
|
||||||
length -= (customizer ? 1 : 0);
|
length -= (customizer ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user