aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-error/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bun-error/index.tsx')
-rw-r--r--packages/bun-error/index.tsx19
1 files changed, 13 insertions, 6 deletions
diff --git a/packages/bun-error/index.tsx b/packages/bun-error/index.tsx
index 9b367c2ef..05c378f8f 100644
--- a/packages/bun-error/index.tsx
+++ b/packages/bun-error/index.tsx
@@ -17,7 +17,12 @@ import {
problemsToMarkdown,
withBunInfo,
} from "./markdown";
-import { fetchMappings, remapPosition, sourceMappings } from "./sourcemap";
+import {
+ fetchAllMappings,
+ fetchMappings,
+ remapPosition,
+ sourceMappings,
+} from "./sourcemap";
export enum StackFrameScope {
Eval = 1,
@@ -1319,13 +1324,15 @@ export function renderRuntimeError(error: Error) {
// But! If we've already fetched the source mappings in this page load before
// Rely on the cached ones
// and don't fetch them again
- const framePromises = exception.stack.frames
+ const framePromises = fetchAllMappings(
+ exception.stack.frames.map((frame) =>
+ normalizedFilename(frame.file, thisCwd)
+ ),
+ signal
+ )
.map((frame, i) => {
if (stopThis.stopped) return null;
- return [
- fetchMappings(normalizedFilename(frame.file, thisCwd), signal),
- i,
- ];
+ return [frame, i];
})
.map((result) => {
if (!result) return;