Skip to content
Snippets Groups Projects
Commit 7ef92023 authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

bug fix

parent 0a46030c
No related branches found
No related tags found
2 merge requests!33Feature/maaping decription to tsv,!30Feature/distribution
......@@ -114,7 +114,6 @@ export class PublishApiComponent implements OnInit {
this.openApi.info['x-catalog-id'] = catId;
this.catalogSelect.selected = catId;
this.onChangeRepository(catId);
this.type = this.getType(catId);
}
getTitleFromFdpApi(fdpApiResponse: FdpApiResponseItem[]): string {
......@@ -175,9 +174,10 @@ export class PublishApiComponent implements OnInit {
}
downloadJson(): void {
let windowVar: any = window.navigator;
const newBlob = new Blob([this.openApiService.getPrettyJson(this.openApi)], { type: 'application/json' });
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(newBlob);
if (windowVar && windowVar.msSaveOrOpenBlob) {
windowVar.msSaveOrOpenBlob(newBlob);
return;
}
const data = window.URL.createObjectURL(newBlob);
......@@ -268,7 +268,6 @@ export class PublishApiComponent implements OnInit {
this.openApi = this.openApiService.getFromString(reader.result as string);
this.openApi.cleanServers(servers[0].url);
this.openApi.info['x-catalog-id'] = catId;
this.type = this.getType(catId)
};
reader.readAsText(jsonFile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment