Skip to content

Commit

Permalink
fix(node/crypto): Assign publicKey and privateKey with let instead of…
Browse files Browse the repository at this point in the history
… const (#24943)

Because public/private key are reassigned, they should be `let` instead
of `const`.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
  • Loading branch information
birkskyum and littledivy authored Aug 8, 2024
1 parent 6fce23c commit 733162a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/node/polyfills/internal/crypto/keygen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ export function generateKeyPair(
const privateKeyHandle = op_node_get_private_key_from_pair(pair);
const publicKeyHandle = op_node_get_public_key_from_pair(pair);

const privateKey = new PrivateKeyObject(privateKeyHandle);
const publicKey = new PublicKeyObject(publicKeyHandle);
let privateKey = new PrivateKeyObject(privateKeyHandle);
let publicKey = new PublicKeyObject(publicKeyHandle);

if (typeof options === "object" && options !== null) {
const { publicKeyEncoding, privateKeyEncoding } = options as any;
Expand Down

0 comments on commit 733162a

Please # to comment.