Skip to content

Commit

Permalink
fix(exporter): use boolean ieVersion for csv export
Browse files Browse the repository at this point in the history
  • Loading branch information
Denny Mueller committed Feb 17, 2016
1 parent aa9b779 commit 17b1a0a
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/features/exporter/js/exporter.js
Expand Up @@ -914,10 +914,19 @@
var a = D.createElement('a');
var strMimeType = 'application/octet-stream;charset=utf-8';
var rawFile;
var ieVersion;
var ieVersion = this.isIE();

// IE10+
if (navigator.msSaveBlob) {
return navigator.msSaveOrOpenBlob(
new Blob(
[exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
{ type: strMimeType } ),
fileName
);
}

ieVersion = this.isIE();
if (ieVersion && ieVersion < 10) {
if (ieVersion) {
var frame = D.createElement('iframe');
document.body.appendChild(frame);

Expand All @@ -931,16 +940,6 @@
return true;
}

// IE10+
if (navigator.msSaveBlob) {
return navigator.msSaveOrOpenBlob(
new Blob(
[exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
{ type: strMimeType } ),
fileName
);
}

//html5 A[download]
if ('download' in a) {
var blob = new Blob(
Expand Down

0 comments on commit 17b1a0a

Please sign in to comment.