Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Fix Benchmark#toString() of error (again) #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevinoid
Copy link
Contributor

Benchmark#toString() incorrectly calls join(error) if !_.isError(Error), which is always true because Error the function is not an instance of Error. When error is an instance of Error this results in an empty string, as discussed in #122.

Fix the check to be !_.isError(error).

I'm a bit confused about how this happened. The issue appears to have occurred in b4bd181, which was ostensibly authored by me. However 9728173, which was the actually authored by me and merged in #122 does not have this error. Perhaps a post-merge fix amended the commit and didn't change the author?

Thanks for considering,
Kevin

`Benchmark#toString()` incorrectly calls `join(error)` if
`!_.isError(Error)`, which is always true because `Error` the function
is not an instance of `Error`.  When `error` is an instance of `Error`
this results in an empty string, as discussed in bestiejs#122.

Fix the check to be `!_.isError(error)`.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant