Avoid using window in export
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"main": "dist/FileSaver.js",
|
"main": "dist/FileSaver.js",
|
||||||
"module": "src/FileSaver.js",
|
"module": "src/FileSaver.js",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/FileSaver.min.js",
|
"dist/FileSaver.min.js"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 0",
|
"test": "echo \"Error: no test specified\" && exit 0",
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
||||||
|
|
||||||
export var saveAs = 'saveAs' in window ? window.saveAs : (function(view) {
|
export var saveAs = saveAs || (function(view) {
|
||||||
"use strict";
|
"use strict";
|
||||||
// IE <10 is explicitly unsupported
|
// IE <10 is explicitly unsupported
|
||||||
if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
|
if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user