Open evmiguel opened 7 months ago
The suggestion was to use optional chaining on the left side of the assignment, but I ran into the tests failing, so I wrapped the assignment in an if condition.
Yes that's my bad, you can't use optional chaining on the left hand side in an assignment.
@evmiguel looking at the rest of the function, the originalError.stack
assignment would also fail.
Looking at how dumpError
is called, I don't see how it would be called with an undefined value. Could you provide a reproduction of the error?
This is a follow up from the discussion in https://github.com/avajs/ava/discussions/3322. The tap reporter was failing when ava timed out because of https://github.com/avajs/ava/blob/01ec2804ab9db0ab3ef11e3b5b0c5697d68f8bc5/lib/reporters/tap.js#L27 being undefined.
The suggestion was to use optional chaining on the left side of the assignment, but I ran into the tests failing, so I wrapped the assignment in an if condition.