diff --git a/underscore.js b/underscore.js index c81fe1b15..0b4989e68 100644 --- a/underscore.js +++ b/underscore.js @@ -464,8 +464,7 @@ // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { - if (_.isArray(obj)) return obj.slice(0); - return _.extend({}, obj); + return _.isArray(obj) ? obj.slice(0) : _.extend({}, obj); }; // Invokes interceptor with the obj, and then returns obj.