crypto: remove useless if statement
The if statement in `ECDH.getPublicKey` is useless. This change is to remove it. PR-URL: https://github.com/nodejs/node/pull/15041 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit is contained in:
parent
2e215f169a
commit
43e7e8d106
@ -191,8 +191,6 @@ ECDH.prototype.generateKeys = function generateKeys(encoding, format) {
|
||||
ECDH.prototype.getPublicKey = function getPublicKey(encoding, format) {
|
||||
var f;
|
||||
if (format) {
|
||||
if (typeof format === 'number')
|
||||
f = format;
|
||||
if (format === 'compressed')
|
||||
f = POINT_CONVERSION_COMPRESSED;
|
||||
else if (format === 'hybrid')
|
||||
|
Loading…
x
Reference in New Issue
Block a user