mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-04 18:37:45 +01:00
only use blob options if available and not IE
This commit is contained in:
parent
1f3ecbab33
commit
3666ee5a87
@ -85,7 +85,12 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveFile(win: Window, blobData: any, blobOptions: any, fileName: string): void {
|
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) {
|
if (navigator.msSaveOrOpenBlob) {
|
||||||
navigator.msSaveBlob(blob, fileName);
|
navigator.msSaveBlob(blob, fileName);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user