Skip to content

Commit 71f266f

Browse files
Marcin Rybackijimmywarting
authored andcommitted
Missing dist build
1 parent 9bd5261 commit 71f266f

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

dist/FileSaver.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
if (typeof opts === 'undefined') opts = {
3131
autoBom: false
3232
};else if (typeof opts !== 'object') {
33-
console.warn('Depricated: Expected third argument to be a object');
33+
console.warn('Deprecated: Expected third argument to be a object');
3434
opts = {
3535
autoBom: !opts
3636
};
@@ -66,7 +66,13 @@
6666
var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker
6767

6868
xhr.open('HEAD', url, false);
69-
xhr.send();
69+
70+
try {
71+
xhr.send();
72+
} catch (e) {
73+
return false;
74+
}
75+
7076
return xhr.status >= 200 && xhr.status <= 299;
7177
} // `a.click()` doesn't work for all browsers (#465)
7278

@@ -135,7 +141,7 @@
135141
} // Fallback to using FileReader and a popup
136142
: function saveAs(blob, name, opts, popup) {
137143
// Open a popup immediately do go around popup blocker
138-
// Mostly only avalible on user interaction and the fileReader is async so...
144+
// Mostly only available on user interaction and the fileReader is async so...
139145
popup = popup || open('', '_blank');
140146

141147
if (popup) {
@@ -150,7 +156,7 @@
150156
var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
151157

152158
if ((isChromeIOS || force && isSafari) && typeof FileReader === 'object') {
153-
// Safari doesn't allow downloading of blob urls
159+
// Safari doesn't allow downloading of blob URLs
154160
var reader = new FileReader();
155161

156162
reader.onloadend = function () {

dist/FileSaver.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)