[bun:error] Fix exception

This commit is contained in:
Jarred Sumner
2022-04-05 06:36:19 -07:00
parent 2c0e8e0a99
commit 70f9294e15
2 changed files with 2 additions and 1 deletions

View File

@@ -1390,6 +1390,7 @@ export function renderRuntimeError(error: Error) {
remapped[1];
}, console.error);
} else {
if (!mappings) return null;
var frame = exception.stack.frames[frameIndex];
const { line, column_start } = frame.position;
const remapped = remapPosition(mappings, line, column_start);

View File

@@ -281,7 +281,7 @@ export function fetchAllMappings(files, signal) {
for (const [file, indices] of [...map.entries()]) {
const mapped = fetchMappings(file, signal);
if (mapped.then) {
if (mapped?.then) {
var resolvers = [];
for (let i = 0; i < indices.length; i++) {
results[indices[i]] = new Promise((resolve, reject) => {