From 680e235f44c168b3dcdd9f2787460b16e9b3c889 Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Tue, 31 Jan 2023 09:14:52 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/errors/dev/vite.ts | 2 +- packages/astro/src/core/errors/overlay.ts | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/astro/src/core/errors/dev/vite.ts b/packages/astro/src/core/errors/dev/vite.ts index 4cc430ff6..3a94f9749 100644 --- a/packages/astro/src/core/errors/dev/vite.ts +++ b/packages/astro/src/core/errors/dev/vite.ts @@ -175,7 +175,7 @@ export async function getViteErrorPayload(err: ErrorWithMetadata): Promise('#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('#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('#hint'); if (hint && err.hint) {