Skip to content

Commit

Permalink
Missing dist build
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Rybacki authored and jimmywarting committed May 14, 2019
1 parent 9bd5261 commit 71f266f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions dist/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if (typeof opts === 'undefined') opts = {
autoBom: false
};else if (typeof opts !== 'object') {
console.warn('Depricated: Expected third argument to be a object');
console.warn('Deprecated: Expected third argument to be a object');
opts = {
autoBom: !opts
};
Expand Down Expand Up @@ -66,7 +66,13 @@
var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker

xhr.open('HEAD', url, false);
xhr.send();

try {
xhr.send();
} catch (e) {
return false;
}

return xhr.status >= 200 && xhr.status <= 299;
} // `a.click()` doesn't work for all browsers (#465)

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

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

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

reader.onloadend = function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/FileSaver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 71f266f

Please sign in to comment.