Skip to content
6 changes: 5 additions & 1 deletion src/plot_api/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ function crawl(objIn, objOut, schema, list, base, path) {
} else if(!Lib.validate(valIn, nestedSchema)) {
list.push(format('value', base, p, valIn));
} else if(nestedSchema.valType === 'enumerated' &&
((nestedSchema.coerceNumber && valIn !== +valOut) || valIn !== valOut)
(
(nestedSchema.coerceNumber && valIn !== +valOut) ||
(!isArrayOrTypedArray(valIn) && valIn !== valOut) ||
(String(valIn) !== String(valOut))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we're comparing the original data array to something we coerced off a deep copy, arrays that make it here will never be ===

)
) {
list.push(format('dynamic', base, p, valIn, valOut));
}
Expand Down