Avoid using window in export

This commit is contained in:
Alexey
2018-01-23 00:12:19 +03:00
parent 9570cf7362
commit 5978f3c577
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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)) {