diff --git a/src/utils/arrayDiff.js b/src/utils/arrayDiff.js index 2b88ef360..d8ec16a93 100644 --- a/src/utils/arrayDiff.js +++ b/src/utils/arrayDiff.js @@ -2,9 +2,10 @@ module.exports = (a, b) => { const result = [] const length = a.length let i = 0 + const bSet = new Set(b) while (i < length) { - if (b.indexOf(a[i]) === -1) { + if (!bSet.has(a[i])) { result.push(a[i]) } i += 1