Skip to content

Commit 07bbb00

Browse files
authored
Merge pull request #3647 from DSpace/backport-3646-to-dspace-8_x
[Port dspace-8_x] Fixed authorization tab not loading in dev mode
2 parents bba9f9c + aae373e commit 07bbb00

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/app/item-page/item-page.resolver.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,22 @@ export const itemPageResolver: ResolveFn<RemoteData<Item>> = (
4040
store: Store<AppState> = inject(Store<AppState>),
4141
authService: AuthService = inject(AuthService),
4242
): Observable<RemoteData<Item>> => {
43-
return itemService.findById(
43+
const itemRD$ = itemService.findById(
4444
route.params.id,
4545
true,
4646
false,
4747
...ITEM_PAGE_LINKS_TO_FOLLOW,
4848
).pipe(
4949
getFirstCompletedRemoteData(),
5050
redirectOn4xx(router, authService),
51+
);
52+
53+
itemRD$.subscribe((itemRD: RemoteData<Item>) => {
54+
store.dispatch(new ResolvedAction(state.url, itemRD.payload));
55+
});
56+
57+
return itemRD$.pipe(
5158
map((rd: RemoteData<Item>) => {
52-
store.dispatch(new ResolvedAction(state.url, rd.payload));
5359
if (rd.hasSucceeded && hasValue(rd.payload)) {
5460
const thisRoute = state.url;
5561

0 commit comments

Comments
 (0)