Skip to content

Commit dbcf4da

Browse files
committed
fix validation for arrayOk enums
1 parent 24c4cb7 commit dbcf4da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plot_api/validate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ function crawl(objIn, objOut, schema, list, base, path) {
214214
} else if(!Lib.validate(valIn, nestedSchema)) {
215215
list.push(format('value', base, p, valIn));
216216
} else if(nestedSchema.valType === 'enumerated' &&
217-
((nestedSchema.coerceNumber && valIn !== +valOut) || valIn !== valOut)
217+
(
218+
(nestedSchema.coerceNumber && valIn !== +valOut) ||
219+
(!isArrayOrTypedArray(valIn) && valIn !== valOut) ||
220+
(String(valIn) !== String(valOut))
221+
)
218222
) {
219223
list.push(format('dynamic', base, p, valIn, valOut));
220224
}

0 commit comments

Comments
 (0)