Skip to content

Commit 43e7e8d

Browse files
starkwangBridgeAR
authored andcommitted
crypto: remove useless if statement
The if statement in `ECDH.getPublicKey` is useless. This change is to remove it. PR-URL: #15041 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
1 parent 2e215f1 commit 43e7e8d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/internal/crypto/diffiehellman.js

-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ ECDH.prototype.generateKeys = function generateKeys(encoding, format) {
191191
ECDH.prototype.getPublicKey = function getPublicKey(encoding, format) {
192192
var f;
193193
if (format) {
194-
if (typeof format === 'number')
195-
f = format;
196194
if (format === 'compressed')
197195
f = POINT_CONVERSION_COMPRESSED;
198196
else if (format === 'hybrid')

0 commit comments

Comments
 (0)