@@ -43,14 +46,16 @@ export class ErrorOutput extends Component {
>
{formattedName || 'Error'}:
{' '}
- {message}
+ {strippedMessage}
);
}
formatStack(): string {
- return this.props.value.stack.split('\n').slice(1).join('\n');
+ const err = this.props.value;
+ const stack = err.name === 'SyntaxError' ? stripAnsi(err.stack) : err.stack;
+ return stack.split('\n').slice(1).join('\n');
}
formatErrorBugReportInfo(): JSX.Element | undefined {