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

Function reloadOnce

src/components/ChunkLoadRecovery.tsx:10–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8export default function ChunkLoadRecovery() {
9 useEffect(() => {
10 const reloadOnce = () => {
11 if (sessionStorage.getItem(SESSION_KEY)) return;
12 sessionStorage.setItem(SESSION_KEY, "1");
13 window.location.reload();
14 };
15
16 const isChunkFailure = (msg: string) =>
17 /ChunkLoadError|Loading chunk \d+|Failed to load chunk|Importing a module script failed/i.test(

Callers 2

onUnhandledRejectionFunction · 0.85
onErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected