Skip to content

Commit 5b0d552

Browse files
authored
fix: show compiler message for older Svelte versions (#761)
Older Svelte versions did extend their compiler error from Error without marking the message property as enumerable. Therefore we need to explicitly add it to the destructuring.
1 parent 559f910 commit 5b0d552

File tree

1 file changed

+1
-1
lines changed
  • packages/repl/src/lib/workers/bundler

1 file changed

+1
-1
lines changed

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ async function bundle({
609609
server: null,
610610
imports: null,
611611
warnings: client.warnings,
612-
error: { ...e }
612+
error: { ...e, message: e.message } // not all Svelte versions return an enumerable message property
613613
};
614614
}
615615
}

0 commit comments

Comments
 (0)