Skip to content

Commit dba8d22

Browse files
authoredDec 11, 2019
Merge pull request #55 from exihuatl/patch-1
Fixes iOS Safari error. Thanks @exihuatl
2 parents cab17e3 + d71d676 commit dba8d22

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎file-download.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ module.exports = function(data, filename, mime, bom) {
2525

2626
document.body.appendChild(tempLink);
2727
tempLink.click();
28-
document.body.removeChild(tempLink);
29-
window.URL.revokeObjectURL(blobURL);
28+
29+
// Fixes "webkit blob resource error 1"
30+
setTimeout(function() {
31+
document.body.removeChild(tempLink);
32+
window.URL.revokeObjectURL(blobURL);
33+
}, 0)
3034
}
3135
}

0 commit comments

Comments
 (0)
Please sign in to comment.