MCPcopy
hub / github.com/OpenSignLabs/OpenSign / lazyWithRetry

Function lazyWithRetry

apps/OpenSign/src/utils/lazyWithRetry.js:4–19  ·  view source on GitHub ↗
(factory)

Source from the content-addressed store, hash-verified

2import { showUpgradeProgress } from "./upgradeProgress";
3
4export function lazyWithRetry(factory) {
5 return React.lazy(() =>
6 factory().catch((error) => {
7 if (
8 error &&
9 error.message &&
10 /Failed to fetch dynamically imported module/.test(error.message)
11 ) {
12 localStorage.setItem("showUpgradeProgress", "1");
13 showUpgradeProgress();
14 setTimeout(() => window.location.reload(), 100);
15 }
16 throw error;
17 })
18 );
19}

Callers 3

App.jsxFile · 0.90
GetDashboard.jsxFile · 0.90
Opensigndrive.jsxFile · 0.90

Calls 1

showUpgradeProgressFunction · 0.90

Tested by

no test coverage detected