From 18e85b813fa994435b01f55cdb56daccdcd96de7 Mon Sep 17 00:00:00 2001 From: Ryan W Tenney Date: Tue, 5 Oct 2010 22:47:55 -0400 Subject: [PATCH] `slice(0)` is interchangable with `slice()` (in method `clone`) --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index ab8d0d8b0..72dbd1d16 100644 --- a/underscore.js +++ b/underscore.js @@ -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.