-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: simplify error class checking (#53)
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.
- Loading branch information
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters