Skip to content
Snippets Groups Projects
Commit e72a1a80 authored by Alvaro Cabrera Durán's avatar Alvaro Cabrera Durán
Browse files

Keep defaults for minItems/maxItems; fix #472

parent 24143a6d
Branches
Tags
No related merge requests found
...@@ -83,7 +83,7 @@ function arrayType(value, path, resolve, traverseCallback) { ...@@ -83,7 +83,7 @@ function arrayType(value, path, resolve, traverseCallback) {
if (optionalsProbability !== false) { if (optionalsProbability !== false) {
length = fixedProbabilities length = fixedProbabilities
? Math.round(maxItems * optionalsProbability) ? Math.round(maxItems * optionalsProbability)
: random.number(minItems, maxItems * optionalsProbability); : random.number(minItems, maxItems) * optionalsProbability;
} }
// TODO below looks bad. Should additionalItems be copied as-is? // TODO below looks bad. Should additionalItems be copied as-is?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment