Merge pull request #208 from evilaliv3/issue/207

Fix issue #207
This commit is contained in:
Eli Grey
2016-03-19 19:12:36 -04:00
+3 -3
View File
@@ -1,6 +1,6 @@
/* FileSaver.js /* FileSaver.js
* A saveAs() FileSaver implementation. * A saveAs() FileSaver implementation.
* 1.1.20151003 * 1.1.20160319
* *
* By Eli Grey, http://eligrey.com * By Eli Grey, http://eligrey.com
* License: MIT * License: MIT
@@ -116,7 +116,7 @@ var saveAs = saveAs || (function(view) {
target_view.location.href = object_url; target_view.location.href = object_url;
} else { } else {
var new_tab = view.open(object_url, "_blank"); var new_tab = view.open(object_url, "_blank");
if (new_tab == undefined && is_safari) { if (new_tab === undefined && is_safari) {
//Apple do not allow window.open, see http://bit.ly/1kZffRI //Apple do not allow window.open, see http://bit.ly/1kZffRI
view.location.href = object_url view.location.href = object_url
} }
@@ -263,7 +263,7 @@ var saveAs = saveAs || (function(view) {
if (typeof module !== "undefined" && module.exports) { if (typeof module !== "undefined" && module.exports) {
module.exports.saveAs = saveAs; module.exports.saveAs = saveAs;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) { } else if ((typeof define !== "undefined" && define !== null) && (define.amd !== null)) {
define([], function() { define([], function() {
return saveAs; return saveAs;
}); });