Cleanup the callback assignment in _.clone and _.cloneDeep.

This commit is contained in:
John-David Dalton
2014-02-22 17:11:22 -08:00
parent c2b1d3b551
commit 1a17cbd26b

View File

@@ -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);
}
/**