mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
slice(0) is interchangable with slice() (in method clone)
This commit is contained in:
@@ -468,7 +468,7 @@
|
|||||||
|
|
||||||
// Create a (shallow-cloned) duplicate of an object.
|
// Create a (shallow-cloned) duplicate of an object.
|
||||||
_.clone = function(obj) {
|
_.clone = function(obj) {
|
||||||
return _.isArray(obj) ? obj.slice(0) : _.extend({}, obj);
|
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Invokes interceptor with the obj, and then returns obj.
|
// Invokes interceptor with the obj, and then returns obj.
|
||||||
|
|||||||
Reference in New Issue
Block a user