[ci] format

This commit is contained in:
Princesseuh 2023-01-31 09:14:52 +00:00 committed by fredkbot
parent 9793f19ecd
commit 66677defea
2 changed files with 11 additions and 11 deletions

View file

@ -175,7 +175,7 @@ export async function getViteErrorPayload(err: ErrorWithMetadata): Promise<Astro
},
plugin,
stack: err.stack,
cause: err.cause
cause: err.cause,
},
};

View file

@ -605,16 +605,16 @@ class ErrorOverlay extends HTMLElement {
this.text('#title', err.title);
this.text('#message-content', err.message, true);
const cause = this.root.querySelector<HTMLElement>('#cause');
if (cause && err.cause) {
if (typeof err.cause === 'string') {
this.text('#cause-content', err.cause);
cause.style.display = 'block';
} else {
this.text('#cause-content', JSON.stringify(err.cause, null, 2));
cause.style.display = 'block';
}
}
const cause = this.root.querySelector<HTMLElement>('#cause');
if (cause && err.cause) {
if (typeof err.cause === 'string') {
this.text('#cause-content', err.cause);
cause.style.display = 'block';
} else {
this.text('#cause-content', JSON.stringify(err.cause, null, 2));
cause.style.display = 'block';
}
}
const hint = this.root.querySelector<HTMLElement>('#hint');
if (hint && err.hint) {