Ensure the exports object is not a DOM element. [closes #197]

Former-commit-id: 3adb679f7f4d7a64e0bc37ed80a443c211a17510
This commit is contained in:
John-David Dalton
2013-02-27 09:10:13 -08:00
parent 999aae0a33
commit 6435aaa64f
3 changed files with 12 additions and 6 deletions

View File

@@ -173,7 +173,7 @@
nativeRandom = Math.random;
/** Detect various environments */
var isIeOpera = !!context.attachEvent,
var isIeOpera = reNative.test(context.attachEvent),
isJSC = !/\n{2,}/.test(Function()),
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
@@ -5224,7 +5224,7 @@
});
}
// check for `exports` after `define` in case a build optimizer adds an `exports` object
else if (freeExports) {
else if (freeExports && !freeExports.nodeType) {
// in Node.js or RingoJS v0.8.0+
if (freeModule) {
(freeModule.exports = _)._ = _;