Cleanup baseDifference.

This commit is contained in:
John-David Dalton
2014-11-12 21:56:26 -08:00
parent 2ae2142b35
commit da792cc272

View File

@@ -1837,15 +1837,16 @@
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values) {
var length = array ? array.length : 0;
var length = array ? array.length : 0,
result = [];
if (!length) {
return [];
return result;
}
var index = -1,
indexOf = getIndexOf(),
isCommon = indexOf == baseIndexOf,
cache = isCommon && values.length >= 200 && createCache(values),
result = [],
valuesLength = values.length;
if (cache) {