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:
Weijia Wang 2017-08-18 17:14:57 +08:00 committed by Ruben Bridgewater
parent 2e215f169a
commit 43e7e8d106
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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')