Skip to content

Commit 7944633

Browse files
Francesco MautoAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2025_02_x/DSC-2422 (pull request DSpace#4479)
[DSC-2422] fix issue with back button, fix minor issue on version notice for workflow item Approved-by: Andrea Barbasso
2 parents d8ade67 + d0afd4d commit 7944633

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
SlicePipe,
56
} from '@angular/common';
67
import {
@@ -110,6 +111,7 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
110111
protected notifyInfoService: NotifyInfoService,
111112
@Inject(PLATFORM_ID) protected platformId: string,
112113
@Inject(APP_CONFIG) private appConfig: AppConfig,
114+
private location: Location,
113115
) {
114116
super(route, router, items, authorizationService, responseService, linkHeadService, notifyInfoService, platformId);
115117
}
@@ -134,7 +136,7 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
134136
* Navigate back in browser history.
135137
*/
136138
back() {
137-
this.router.navigate(['../'], { relativeTo: this.route });
139+
this.location.back();
138140
}
139141

140142
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)