Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: simplify KeyObject constructor #35064

Merged
merged 1 commit into from
Sep 7, 2020
Merged

Commits on Sep 7, 2020

  1. 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: nodejs#35064
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Denys Otrishko <shishugi@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Trott committed Sep 7, 2020
    Configuration menu
    Copy the full SHA
    ac6ba6b View commit details
    Browse the repository at this point in the history