You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is caused by the fact that there is no else statement to handle the if (typeof data == "number" && isFinite(data)).
So when the if (typeof data == "number" && isFinite(data)) fails, the validator just returns without any errors, when in fact there should be an error.
I am using "ajv": "^8.11.0".
I believe that this is a bug.
The text was updated successfully, but these errors were encountered:
https://ajv.js.org/keywords.html#define-keyword-with-code-generation-function
In the very first example of the above:
This also returns true:
Here is the compiled validator code:
The bug is caused by the fact that there is no
else
statement to handle theif (typeof data == "number" && isFinite(data))
.So when the
if (typeof data == "number" && isFinite(data))
fails, the validator just returns without any errors, when in fact there should be an error.I am using
"ajv": "^8.11.0"
.I believe that this is a bug.
The text was updated successfully, but these errors were encountered: