Skip to content

Commit c200dda

Browse files
Francesco MautoAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2024_02_x/DSC-2422 (pull request DSpace#4478)
[DSC-2422] fix issue with back button, fix minor issue on version notice for workflow item Approved-by: Andrea Barbasso
2 parents 5e005df + 7a421f2 commit c200dda

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/app/item-page/full/full-item-page.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
AsyncPipe,
33
KeyValuePipe,
4+
Location,
45
NgForOf,
56
NgIf,
67
SlicePipe,
@@ -117,6 +118,7 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
117118
protected notifyInfoService: NotifyInfoService,
118119
@Inject(PLATFORM_ID) protected platformId: string,
119120
@Inject(APP_CONFIG) private appConfig: AppConfig,
121+
private location: Location,
120122
) {
121123
super(route, router, items, authorizationService, responseService, linkHeadService, notifyInfoService, platformId);
122124
}
@@ -141,7 +143,7 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
141143
* Navigate back in browser history.
142144
*/
143145
back() {
144-
this.router.navigate(['../'], { relativeTo: this.route });
146+
this.location.back();
145147
}
146148

147149
ngOnDestroy() {

src/app/item-page/versions/notice/item-versions-notice.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class ItemVersionsNoticeComponent implements OnInit {
127127
startWith(false),
128128
);
129129
}
130-
this.destinationPage$ = this.latestVersion$.pipe(
130+
this.destinationPage$ = this.latestVersion$?.pipe(
131131
switchMap(version => version.item),
132132
map(item => this.getItemPage(item.payload)),
133133
);

0 commit comments

Comments
 (0)