Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: simplify KeyObject constructor
Inline a function that only gets called in the constructor. Make call to `super()` more straightforward in the process by removing conditional involving the function as it only ever returns `undefined` or else throws. That made the code a little hard to understand, as without looking at the function, one would likely expect it to return `true` on success rather than `undefined`. PR-URL: #35064 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
- Loading branch information