Clarify error message for NaN

master
Sven Slootweg 4 years ago
parent 547c788d9c
commit 26333f43a7

@ -9,6 +9,6 @@ module.exports = function (value) {
if (!isNumberObject(value)) {
throw new ValidationError("Must be a number");
} else if (Number.isNaN(value)) {
throw new ValidationError(`Must not be NaN`);
throw new ValidationError(`Must be a number (must not be NaN)`);
}
};

Loading…
Cancel
Save