summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Princesseuh <Princesseuh@users.noreply.github.com> 2023-01-31 09:14:52 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2023-01-31 09:14:52 +0000
commit66677defeadfca651cb7d85be0e29298885c2088 (patch)
tree94b89f9be020e7a4c7c5a74cfd8a02c93afc13da
parent9793f19ecd4e64cbf3140454fe52aeee2c22c8c9 (diff)
downloadastro-66677defeadfca651cb7d85be0e29298885c2088.tar.gz
astro-66677defeadfca651cb7d85be0e29298885c2088.tar.zst
astro-66677defeadfca651cb7d85be0e29298885c2088.zip
[ci] format
Diffstat (limited to '')
-rw-r--r--packages/astro/src/core/errors/dev/vite.ts2
-rw-r--r--packages/astro/src/core/errors/overlay.ts20
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<Astro
},
plugin,
stack: err.stack,
- cause: err.cause
+ cause: err.cause,
},
};
diff --git a/packages/astro/src/core/errors/overlay.ts b/packages/astro/src/core/errors/overlay.ts
index 0e3f76b00..bd1b10326 100644
--- a/packages/astro/src/core/errors/overlay.ts
+++ b/packages/astro/src/core/errors/overlay.ts
@@ -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) {