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