Skip to content

Commit

Permalink
120150: Fixed authorization tab not loading in dev mode
Browse files Browse the repository at this point in the history
(cherry picked from commit c062d95)
  • Loading branch information
alexandrevryghem authored and github-actions[bot] committed Nov 12, 2024
1 parent bba9f9c commit aae373e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/item-page/item-page.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,22 @@ export const itemPageResolver: ResolveFn<RemoteData<Item>> = (
store: Store<AppState> = inject(Store<AppState>),
authService: AuthService = inject(AuthService),
): Observable<RemoteData<Item>> => {
return itemService.findById(
const itemRD$ = itemService.findById(
route.params.id,
true,
false,
...ITEM_PAGE_LINKS_TO_FOLLOW,
).pipe(
getFirstCompletedRemoteData(),
redirectOn4xx(router, authService),
);

itemRD$.subscribe((itemRD: RemoteData<Item>) => {
store.dispatch(new ResolvedAction(state.url, itemRD.payload));
});

return itemRD$.pipe(
map((rd: RemoteData<Item>) => {
store.dispatch(new ResolvedAction(state.url, rd.payload));
if (rd.hasSucceeded && hasValue(rd.payload)) {
const thisRoute = state.url;

Expand Down

0 comments on commit aae373e

Please sign in to comment.