Skip to content

Commit a51a735

Browse files
committed
frontend: fix possibly undefined error
1 parent 4e38955 commit a51a735

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/src/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ import { useEffect, useState } from "preact/hooks";
5050

5151
if (isDebugMode.value) {
5252
addEventListener("unhandledrejection", (event) => {
53+
if (!event.reason || !event.reason.stack) {
54+
console.error("Unhandled rejection without stack trace:", event);
55+
return;
56+
}
5357
const stack = event.reason.stack.split("\n");
5458

5559
const evt = {

0 commit comments

Comments
 (0)