diff --git a/src/core/utilities.js b/src/core/utilities.js index 715311b82..d6ff13212 100644 --- a/src/core/utilities.js +++ b/src/core/utilities.js @@ -43,18 +43,7 @@ export const performance = { // Returns a new Array with the elements that are in a but not in b export function diff (a, b) { - const result = a.slice(); - - for (let i = 0; i < result.length; i++) { - for (let j = 0; j < b.length; j++) { - if (result[i] === b[j]) { - result.splice(i, 1); - i--; - break; - } - } - } - return result; + return a.filter((a) => b.indexOf(a) === -1); } /**