Skip to content

Commit

Permalink
slice(0) is interchangable with slice() (in method clone)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantenney committed Oct 6, 2010
1 parent 4d901fb commit 18e85b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@

// Create a (shallow-cloned) duplicate of an object.
_.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.
Expand Down

0 comments on commit 18e85b8

Please sign in to comment.