Skip to content

Commit

Permalink
fix(router): inject HttpClient only when page endpoint is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Oct 18, 2024
1 parent adcf2ae commit f9d2546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/router/src/lib/route-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export function toRouteConfig(routeMeta: RouteMeta | undefined): RouteConfig {
routeConfig.resolve = {
...routeConfig.resolve,
load: async (route) => {
const http = inject(HttpClient);
const routeConfig = route.routeConfig as Route & {
[ANALOG_META_KEY]: { endpoint: string; endpointKey: string };
};

if (ANALOG_PAGE_ENDPOINTS[routeConfig[ANALOG_META_KEY].endpointKey]) {
const http = inject(HttpClient);
const url = injectRouteEndpointURL(route);

if (
Expand Down

0 comments on commit f9d2546

Please sign in to comment.