[CST-4591] Fix issue with navigate when entity type is empty

This commit is contained in:
Giuseppe Digilio
2021-09-24 13:17:35 +02:00
parent 6bf3b8e7cd
commit a170f1f8a9

View File

@@ -92,7 +92,11 @@ export class MyDSpaceNewExternalDropdownComponent implements OnInit, OnDestroy {
* Method called on clicking the button 'Import metadata from external source'. It opens the page of the external import.
*/
openPage(entity: ItemType) {
this.router.navigate(['/import-external'], { queryParams: { entity: entity.label } });
const params = Object.create({});
if (entity) {
params.entity = entity.label;
}
this.router.navigate(['/import-external'], { queryParams: params });
}
/**