diff --git a/lib/internal/crypto/sig.js b/lib/internal/crypto/sig.js index b6f8ceb50186d1..8aff7354735404 100644 --- a/lib/internal/crypto/sig.js +++ b/lib/internal/crypto/sig.js @@ -57,10 +57,11 @@ function getSaltLength(options) { function getIntOption(name, defaultValue, options) { if (options.hasOwnProperty(name)) { - if (options[name] === options[name] >> 0) { - return options[name]; + const value = options[name]; + if (value === value >> 0) { + return value; } else { - throw new ERR_INVALID_OPT_VALUE(name, options[name]); + throw new ERR_INVALID_OPT_VALUE(name, value); } } return defaultValue;