Merge branch 'main' into switch-to-vite

This commit is contained in:
binwiederhier 2023-05-24 21:37:28 -04:00
commit d1e59fe08c
10 changed files with 116 additions and 22 deletions

View file

@ -45,9 +45,10 @@ class ErrorBoundaryImpl extends React.Component {
// Fetch additional info and a better stack trace
StackTrace.fromError(error).then((stack) => {
console.error("[ErrorBoundary] Stacktrace fetched", stack);
const niceStack = `${error.toString()}\n${stack
.map((el) => ` at ${el.functionName} (${el.fileName}:${el.columnNumber}:${el.lineNumber})`)
.join("\n")}`;
const stackString = stack
.map((el) => ` at ${el.functionName} (${el.fileName}:${el.columnNumber}:${el.lineNumber})`)
.join("\n");
const niceStack = `${error.toString()}\n${stackString}`;
this.setState({ niceStack });
});
}