mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
120150: Fixed authorization tab not loading in dev mode
This commit is contained in:
@@ -40,7 +40,7 @@ export const itemPageResolver: ResolveFn<RemoteData<Item>> = (
|
|||||||
store: Store<AppState> = inject(Store<AppState>),
|
store: Store<AppState> = inject(Store<AppState>),
|
||||||
authService: AuthService = inject(AuthService),
|
authService: AuthService = inject(AuthService),
|
||||||
): Observable<RemoteData<Item>> => {
|
): Observable<RemoteData<Item>> => {
|
||||||
return itemService.findById(
|
const itemRD$ = itemService.findById(
|
||||||
route.params.id,
|
route.params.id,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
@@ -48,8 +48,14 @@ export const itemPageResolver: ResolveFn<RemoteData<Item>> = (
|
|||||||
).pipe(
|
).pipe(
|
||||||
getFirstCompletedRemoteData(),
|
getFirstCompletedRemoteData(),
|
||||||
redirectOn4xx(router, authService),
|
redirectOn4xx(router, authService),
|
||||||
|
);
|
||||||
|
|
||||||
|
itemRD$.subscribe((itemRD: RemoteData<Item>) => {
|
||||||
|
store.dispatch(new ResolvedAction(state.url, itemRD.payload));
|
||||||
|
});
|
||||||
|
|
||||||
|
return itemRD$.pipe(
|
||||||
map((rd: RemoteData<Item>) => {
|
map((rd: RemoteData<Item>) => {
|
||||||
store.dispatch(new ResolvedAction(state.url, rd.payload));
|
|
||||||
if (rd.hasSucceeded && hasValue(rd.payload)) {
|
if (rd.hasSucceeded && hasValue(rd.payload)) {
|
||||||
const thisRoute = state.url;
|
const thisRoute = state.url;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user