fix array equality check

master
Brad Cornes 2020-04-19 17:30:25 +01:00
parent dd553d9d03
commit 37bdf7439d
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,10 @@ function glob(pattern, options = {}) {
}
function arraysEqual(arr1, arr2) {
return JSON.stringify(arr1.sort()) === JSON.stringify(arr2.sort())
return (
JSON.stringify(arr1.concat([]).sort()) ===
JSON.stringify(arr2.concat([]).sort())
)
}
export default async function getClassNames(