mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Cleanup the callback assignment in _.clone and _.cloneDeep.
This commit is contained in:
@@ -5401,7 +5401,8 @@
|
||||
callback = null;
|
||||
}
|
||||
}
|
||||
return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
|
||||
callback = typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1);
|
||||
return baseClone(value, isDeep, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5447,7 +5448,8 @@
|
||||
* // => false
|
||||
*/
|
||||
function cloneDeep(value, callback, thisArg) {
|
||||
return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
|
||||
callback = typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1);
|
||||
return baseClone(value, true, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user