MCPcopy Create free account
hub / github.com/bytebase/bytebase / isAppRouterReady

Function isAppRouterReady

frontend/src/react/router/navigation.ts:155–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153// Resolves once the data router has completed its initial load (mirrors
154// vue-router `router.isReady()`).
155export function isAppRouterReady(): Promise<void> {
156 if (!appRouter || appRouter.state?.initialized !== false) {
157 return Promise.resolve();
158 }
159 return new Promise((resolve) => {
160 const unsubscribe = appRouter?.subscribe?.((state) => {
161 if (state.initialized) {
162 unsubscribe?.();
163 resolve();
164 }
165 });
166 if (!unsubscribe) resolve();
167 });
168}

Callers 1

index.tsFile · 0.90

Calls 2

resolveFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected