mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Update root assignment to work in Firefox extensions. [closes #1340]
This commit is contained in:
committed by
John-David Dalton
parent
ffd3e17364
commit
df17244353
@@ -279,7 +279,7 @@
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal;
|
||||
var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object) ? value : null;
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user