Skip to content

Commit 9052526

Browse files
committedMar 31, 2020
Merge branch 'master' of https://github.com/guoqchen1001/js-file-download into guoqchen1001-master
2 parents 6809f82 + 82163de commit 9052526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎file-download.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function(data, filename, mime, bom) {
99
window.navigator.msSaveBlob(blob, filename);
1010
}
1111
else {
12-
var blobURL = (window.URL ? window.URL : window.webkitURL).createObjectURL(blob);
12+
var blobURL = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob);
1313
var tempLink = document.createElement('a');
1414
tempLink.style.display = 'none';
1515
tempLink.href = blobURL;

0 commit comments

Comments
 (0)
Please sign in to comment.