mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
101623: Fix request being sent with uuid=undefined if not going to a DSO page
This commit is contained in:
@@ -50,6 +50,10 @@ export class DSOEditMenuResolver implements Resolve<{ [key: string]: MenuSection
|
|||||||
if (hasNoValue(id) && hasValue(route.queryParams.scope)) {
|
if (hasNoValue(id) && hasValue(route.queryParams.scope)) {
|
||||||
id = route.queryParams.scope;
|
id = route.queryParams.scope;
|
||||||
}
|
}
|
||||||
|
if (hasNoValue(id)) {
|
||||||
|
// If there's no ID, we're not on a DSO homepage, so pass on any pre-existing menu route data
|
||||||
|
return observableOf({ ...route.data?.menu });
|
||||||
|
} else {
|
||||||
return this.dSpaceObjectDataService.findById(id, true, false).pipe(
|
return this.dSpaceObjectDataService.findById(id, true, false).pipe(
|
||||||
getFirstCompletedRemoteData(),
|
getFirstCompletedRemoteData(),
|
||||||
switchMap((dsoRD) => {
|
switchMap((dsoRD) => {
|
||||||
@@ -72,6 +76,7 @@ export class DSOEditMenuResolver implements Resolve<{ [key: string]: MenuSection
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all the menus for a dso based on the route and state
|
* Return all the menus for a dso based on the route and state
|
||||||
|
Reference in New Issue
Block a user