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

fix: simplify error class checking #53

Merged
merged 1 commit into from
May 8, 2024
Merged

Commits on May 8, 2024

  1. fix: simplify error class checking

    Previously, we were unnecessarily trying to determine if the passed
    object was in fact a class which extends `Error`.
    
    We don't actually care about this, really. We just want to know if the
    `thrown` is an instance of the thing you passed.
    
    Due to this, we can simplify by simply checking that the `errorLike` is
    something with a `prototype` and assert that the `thrown` is an instance
    of it.
    43081j committed May 8, 2024
    Configuration menu
    Copy the full SHA
    0727926 View commit details
    Browse the repository at this point in the history