mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Ensure root is set correctly when required by a greasemonkey userscript. [closes #759]
This commit is contained in:
@@ -277,7 +277,7 @@
|
||||
};
|
||||
|
||||
/** Used as a reference to the global object */
|
||||
var root = (objectTypes[typeof window] && window) || this;
|
||||
var root = (objectTypes[typeof window] && window !== (this && this.window)) ? window : this;
|
||||
|
||||
/** Detect free variable `exports` */
|
||||
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
|
||||
|
||||
Reference in New Issue
Block a user