Skip to content

Commit 38783bc

Browse files
authored
use faster check
1 parent 240cf04 commit 38783bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function ({ schema, messages }, path, context) {
1010
sanitized = true;
1111
// Convert to array if not and the value is not null or undefined
1212
src.push(`
13-
if (!Array.isArray(value) && [null, undefined].indexOf(value) === -1) {
13+
if (!Array.isArray(value) && value != null) {
1414
value = [value];
1515
}
1616
`);

0 commit comments

Comments
 (0)