MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / onUnhandledRejection

Function onUnhandledRejection

src/components/ChunkLoadRecovery.tsx:21–25  ·  view source on GitHub ↗
(e: PromiseRejectionEvent)

Source from the content-addressed store, hash-verified

19 );
20
21 const onUnhandledRejection = (e: PromiseRejectionEvent) => {
22 const r = e.reason;
23 const msg = typeof r?.message === "string" ? r.message : String(r ?? "");
24 if (isChunkFailure(msg)) reloadOnce();
25 };
26
27 const onError = (e: ErrorEvent) => {
28 const msg = e.message ?? "";

Callers

nothing calls this directly

Calls 2

isChunkFailureFunction · 0.85
reloadOnceFunction · 0.85

Tested by

no test coverage detected