Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup!: Update lib/internal/crypto/keygen.js
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
  • Loading branch information
himself65 and VoltrexKeyva committed Jul 19, 2021
commit 5a204974f8e5c12d7feb53e71cabebd00a31b8e8
8 changes: 4 additions & 4 deletions lib/internal/crypto/keygen.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const {
const { isArrayBufferView } = require('internal/util/types');

function wrapKey(key, ctor) {
if (typeof key === 'string' ||
isArrayBufferView(key) ||
isJwk(key))
return key;
if (typeof key === 'string' ||
isArrayBufferView(key) ||
isJwk(key))
return key;
return new ctor(key);
}

Expand Down