[Library | data-transfer-v2]: transferData.component.ts: Check we are on client side to open the modal | [Bug fix] In error message.

This commit is contained in:
Konstantina Galouni 2023-03-03 15:12:26 +02:00
parent b34f1cdfbf
commit ed856076d4
1 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,9 @@ export class EGIDataTransferComponent {
this.egiTransferModal.alertTitle = "EOSC data transfer service [demo]";
this.egiTransferModal.stayOpen = true;
this.init();
this.egiTransferModal.open();
if(typeof document !== 'undefined') {
this.egiTransferModal.open();
}
}
close(){
if(this.isOpen) {
@ -180,7 +182,7 @@ export class EGIDataTransferComponent {
this.status = "init";
}, error => {
this.status = "errorParser";
this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported.':( error.error && error.error.description && error.error.description? error.error.description+'.':'Error parsing information.') ;
this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported.':( error.error && error.error.description && error.error.description? (error.error.description+'.'):'Error parsing information.') ;
this.statusMessage = "danger";
/* UIkit.notification(this.message, {
status: 'error',