Skip to content

Commit 1fb1a63

Browse files
committed
when printing errors to console, append a new line between errors and string causes
1 parent 35c4630 commit 1fb1a63

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

front_end/panels/console/ConsoleViewMessage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
10061006
if (cause && cause.subtype === 'error') {
10071007
await formatErrorStack(cause, /* includeCausedByPrefix */ true);
10081008
} else if (cause && cause.type === 'string') {
1009+
if (errorElementType === 'span') {
1010+
result.append(document.createElement('br'));
1011+
}
10091012
result.append(`Caused by: ${cause.value}`);
10101013
}
10111014
};

0 commit comments

Comments
 (0)