Ensure _.xor returns an empty array when comparing the same array. [closes #2776]

This commit is contained in:
John-David Dalton
2016-10-31 09:56:55 -07:00
parent 46d1f53ee9
commit 0fcf43b02b
2 changed files with 10 additions and 1 deletions

View File

@@ -4414,7 +4414,7 @@
while (++othIndex < length) {
var othArray = arrays[othIndex];
if (othArray !== array) {
if (othIndex != index) {
result[index] = baseDifference(result[index] || array, othArray, iteratee, comparator);
}
}