We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4e9fbb commit 72533e9Copy full SHA for 72533e9
lib/rules/array.js
@@ -56,7 +56,7 @@ module.exports = function({ schema, messages }, path, context) {
56
57
if (schema.unique === true) {
58
src.push(`
59
- if(len > Array.from(new Set(value)).length) {
+ if(len > (new Set(value)).size) {
60
${this.makeError({ type: "arrayUnique", expected: "Array.from(new Set(value.filter((item, index) => value.indexOf(item) !== index)))", actual: "value", messages })}
61
}
62
`);
0 commit comments