mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
79220: Fix edit group navigation bug
This commit is contained in:
@@ -210,4 +210,11 @@ describe('GroupFormComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('ngOnDestroy', () => {
|
||||
it('does NOT call router.navigate', () => {
|
||||
component.ngOnDestroy();
|
||||
expect(router.navigate).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -405,7 +405,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
@HostListener('window:beforeunload')
|
||||
ngOnDestroy(): void {
|
||||
this.onCancel();
|
||||
this.groupDataService.cancelEditGroup();
|
||||
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user