Skip to content

Commit 1cbe500

Browse files
author
francescomauto
committed
[DSC-2422] fix issue with back button, fix minor issue on version notice for workflow item
Porting of [UXP-420]
1 parent 39a1b8b commit 1cbe500

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
@@ -3,6 +3,7 @@ import {
33
KeyValuePipe,
44
NgForOf,
55
NgIf,
6+
Location,
67
SlicePipe,
78
} from '@angular/common';
89
import {
@@ -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)