From 5afeed56ef88a288ae8e8302ed7a09970d63e890 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 19 Sep 2012 22:15:15 -0700 Subject: [PATCH] Cleanup `_.difference` and `_.union`. Former-commit-id: 1fcaab3989caaaacd9fe73de071d8f360f52b715 --- lodash.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index 4b6e67594..e1d16d6e3 100644 --- a/lodash.js +++ b/lodash.js @@ -2493,7 +2493,7 @@ } var index = -1, length = array.length, - flattened = concat.apply(result, arguments), + flattened = concat.apply(ArrayProto, arguments), contains = cachedContains(flattened, length); while (++index < length) { @@ -3065,9 +3065,9 @@ */ function union() { var index = -1, - result = [], - flattened = concat.apply(result, arguments), - length = flattened.length; + flattened = concat.apply(ArrayProto, arguments), + length = flattened.length, + result = []; while (++index < length) { if (indexOf(result, flattened[index]) < 0) {