From 1bf9b35b544700254d3d509b3cca006e2230bc81 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Mon, 4 Dec 2017 19:40:44 +0100 Subject: [PATCH] Fix RollUp-Error because of This is Undefined Rewrite make it compatible with RollUp rollup/rollup#759 MrRio/jsPDF#1533 --- FileSaver.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FileSaver.js b/FileSaver.js index fb71494..a74007c 100644 --- a/FileSaver.js +++ b/FileSaver.js @@ -173,7 +173,9 @@ var saveAs = saveAs || (function(view) { }( typeof self !== "undefined" && self || typeof window !== "undefined" && window - || this.content + || typeof global !== "undefined && global + || Function('return this.content')() + || Function('return this')() )); // `self` is undefined in Firefox for Android content script context // while `this` is nsIContentFrameMessageManager