We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 055630b + 793559f commit 13e26afCopy full SHA for 13e26af
file-download.js
@@ -1,5 +1,5 @@
1
-module.exports = function(data, filename, mime, bom = null) {
2
- var blobData = (bom) ? [bom, data] : [data]
+module.exports = function(data, filename, mime, bom) {
+ var blobData = (typeof bom !== 'undefined') ? [bom, data] : [data]
3
var blob = new Blob(blobData, {type: mime || 'application/octet-stream'});
4
if (typeof window.navigator.msSaveBlob !== 'undefined') {
5
// IE workaround for "HTML7007: One or more blob URLs were
0 commit comments