« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/write/build-modes/live-dev-server.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index e2c976b9..2538cb30 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -84,11 +84,14 @@ export async function go({
   niceShowAggregate,
 }) {
   const showError = (error) => {
-    if (error instanceof AggregateError && niceShowAggregate) {
-      niceShowAggregate(error);
-    } else {
-      console.error(inspect(error, {depth: Infinity}));
+    if (niceShowAggregate) {
+      if (error.errors || error.cause) {
+        niceShowAggregate(error);
+        return;
+      }
     }
+
+    console.error(inspect(error, {depth: Infinity}));
   };
 
   const host = cliOptions['host'] ?? defaultHost;