Merge pull request #906 from soycode/master
check for global before assigning
This commit is contained in:
@@ -24,7 +24,11 @@ var getJasmineRequireObj = (function (jasmineGlobal) {
|
||||
var jasmineRequire;
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
jasmineGlobal = global;
|
||||
if (typeof global !== 'undefined') {
|
||||
jasmineGlobal = global;
|
||||
} else {
|
||||
jasmineGlobal = {};
|
||||
}
|
||||
jasmineRequire = exports;
|
||||
} else {
|
||||
if (typeof window !== 'undefined' && typeof window.toString === 'function' && window.toString() === '[object GjsGlobal]') {
|
||||
|
||||
@@ -2,7 +2,11 @@ var getJasmineRequireObj = (function (jasmineGlobal) {
|
||||
var jasmineRequire;
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
jasmineGlobal = global;
|
||||
if (typeof global !== 'undefined') {
|
||||
jasmineGlobal = global;
|
||||
} else {
|
||||
jasmineGlobal = {};
|
||||
}
|
||||
jasmineRequire = exports;
|
||||
} else {
|
||||
if (typeof window !== 'undefined' && typeof window.toString === 'function' && window.toString() === '[object GjsGlobal]') {
|
||||
|
||||
Reference in New Issue
Block a user