Skip to content

Conversation

evmiguel
Copy link

This is a follow up from the discussion in #3322. The tap reporter was failing when ava timed out because of

originalError.name = name; // Restore the original name.

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.

@novemberborn
Copy link
Member

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.

@novemberborn novemberborn marked this pull request as ready for review May 5, 2024 19:56
@novemberborn novemberborn marked this pull request as draft May 5, 2024 19:57
@novemberborn
Copy link
Member

@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?

@novemberborn
Copy link
Member

Closing due to inactivity. We'd be happy to pick this up again when you have the time to get back to this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants