only use blob options if available and not IE

This commit is contained in:
Kyle Spearrin 2018-06-12 14:35:44 -04:00
parent 1f3ecbab33
commit 3666ee5a87
1 changed files with 6 additions and 1 deletions

View File

@ -85,7 +85,12 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
}
saveFile(win: Window, blobData: any, blobOptions: any, fileName: string): void {
const blob = new Blob([blobData], blobOptions);
let blob: Blob = null;
if (blobOptions != null && !this.isIE()) {
blob = new Blob([blobData], blobOptions);
} else {
blob = new Blob([blobData]);
}
if (navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, fileName);
} else {