MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / route

Function route

apps/client/src/code/helpers.ts:46–66  ·  view source on GitHub ↗
(router_?: Router)

Source from the content-addressed store, hash-verified

44let _route: Ref<RouteLocationNormalized>;
45
46export function route(router_?: Router) {
47 if (_route != null) {
48 return _route;
49 }
50
51 let route: Ref<RouteLocationNormalized> | undefined;
52
53 if (route == null) {
54 route = router(router_).currentRoute;
55 }
56
57 if (route == null) {
58 throw new Error('Unable to load route.');
59 }
60
61 if (process.env.CLIENT) {
62 _route = route;
63 }
64
65 return route;
66}

Callers 4

index.tsFile · 0.85
loginFunction · 0.85
tryRefreshTokensFunction · 0.85
finishSetupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected