mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Ensure _.intersection of a single array returns an empty array. [closes #1085]
This commit is contained in:
@@ -5094,7 +5094,8 @@
|
||||
argsLength = arguments.length,
|
||||
caches = [],
|
||||
indexOf = getIndexOf(),
|
||||
isCommon = indexOf == baseIndexOf;
|
||||
isCommon = indexOf == baseIndexOf,
|
||||
result = [];
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = arguments[argsIndex];
|
||||
@@ -5104,10 +5105,12 @@
|
||||
}
|
||||
}
|
||||
argsLength = args.length;
|
||||
if (argsLength < 2) {
|
||||
return result;
|
||||
}
|
||||
var array = args[0],
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [],
|
||||
seen = caches[0];
|
||||
|
||||
outer:
|
||||
|
||||
Reference in New Issue
Block a user