Skip to content

Commit

Permalink
Merge pull request #6464 from capGoblin/fix/misleading-fes
Browse files Browse the repository at this point in the history
Fix: Misleading error message when NaN passed
  • Loading branch information
limzykenneth authored Oct 12, 2023
2 parents 3d62084 + d454628 commit efdaa35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/friendly_errors/validate_params.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
const argType =
arg instanceof Array
? 'array'
: arg === null ? 'null' : arg.name || typeof arg;
: arg === null ? 'null' : arg === undefined ? 'undefined' : typeof arg === 'number' && isNaN(arg) ? 'NaN' : arg.name || typeof arg;

translationObj = {
func,
Expand Down

0 comments on commit efdaa35

Please sign in to comment.