From ff544ae997b9f600f43c39c932f45fad533667cd Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 6 Feb 2012 12:24:13 -0500 Subject: [PATCH] `_.difference` should perform a shallow flatten --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index c75bf4f75..a9d179d50 100644 --- a/underscore.js +++ b/underscore.js @@ -403,7 +403,7 @@ // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = function(array) { - var rest = _.flatten(slice.call(arguments, 1)); + var rest = _.flatten(slice.call(arguments, 1), true); return _.filter(array, function(value){ return !_.include(rest, value); }); };