Skip to content

Commit d71d676

Browse files
authoredDec 9, 2019
Fixes iOS Safari error.
1 parent cab17e3 commit d71d676

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.