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
  • Loading branch information
alexandrevryghem committed Nov 12, 2024
1 parent f6d8446 commit c062d95
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,
...getItemPageLinksToFollow(),
).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 c062d95

Please sign in to comment.