diff --git a/lib/internal/crypto/sig.js b/lib/internal/crypto/sig.js index d5c4c46192cd17..f6b9d9d9a994e7 100644 --- a/lib/internal/crypto/sig.js +++ b/lib/internal/crypto/sig.js @@ -177,7 +177,7 @@ function signOneShot(algorithm, data, key, callback) { let keyData; if (isKeyObject(key) || isCryptoKey(key)) { ({ data: keyData } = preparePrivateKey(key)); - } else if (key != null && (isKeyObject(key.key) || isCryptoKey(key.key))) { + } else if (isKeyObject(key.key) || isCryptoKey(key.key)) { ({ data: keyData } = preparePrivateKey(key.key)); } else { keyData = createPrivateKey(key)[kHandle];