Skip to content

Commit

Permalink
Fix an issue where the logger blew up while flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Feb 29, 2024
1 parent 51a1894 commit 4802e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/utils/Logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class Logger {
getCallSite() {
const err = new Error();
Error.captureStackTrace(err, this.getCallSite);
const stack = err.stack.split("\n")[3]; // Adjust this value as needed
const stack = err?.stack.split("\n")[3];
// Extract and format call site from stack trace
return stack.trim().replace(/^at\s+/g, "");
return stack?.trim()?.replace(/^at\s+/g, "");
}
}

Expand Down

0 comments on commit 4802e53

Please sign in to comment.