Commit 58da243a authored by Vitali Stupin's avatar Vitali Stupin
Browse files

Merge pull request #18 in XTSS/xtss-catalogue from develop to release

* commit 'ce2301e3':
  subsystem-list.component.spec.ts edited online with Bitbucket
  subsystem-list.component.ts edited online with Bitbucket
parents e100ef13 ce2301e3
......@@ -84,7 +84,7 @@ describe('SubsystemListComponent', () => {
fixture = TestBed.createComponent(SubsystemListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
expect(TestBed.get(Router).navigateByUrl).toHaveBeenCalledWith('/DEFINST');
expect(TestBed.get(Router).navigateByUrl).toHaveBeenCalledWith('/DEFINST', Object({ replaceUrl: true }));
});
it('should detect when instance is not selected', () => {
......
......@@ -109,7 +109,7 @@ export class SubsystemListComponent implements OnInit, AfterViewInit, OnDestroy
// Redirect to default instance if instance is empty or invalid
if (!this.subsystemsService.getInstances().includes(params.instance)) {
this.router.navigateByUrl('/' + this.subsystemsService.getDefaultInstance());
this.router.navigateByUrl('/' + this.subsystemsService.getDefaultInstance(), { replaceUrl: true });
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment