diff --git a/lib/util.js b/lib/util.js index aaede5ad2..b983a5f8d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -120,7 +120,11 @@ util.globalScope = (function() { return global; } - return typeof self === 'undefined' ? window : self; + return typeof self !== "undefined" + ? self + : typeof window !== "undefined" + ? window + : new Function("return this")(); })(); // define isArray