React Native: Remove Unnecessary document.body Shim

This commit is contained in:
Tim Yung 2015-03-04 13:06:01 -08:00
parent fd198b71dc
commit 45deae03af

View File

@ -51,14 +51,11 @@ function setupDocumentShim() {
throw getInvalidGlobalUseError('Image'); throw getInvalidGlobalUseError('Image');
} }
}; };
if (!GLOBAL.document) {
// This shouldn't be needed but scroller library fails without it. If
// we fixed the scroller, we wouldn't need this.
GLOBAL.document = {body: {}};
}
// Force `ExecutionEnvironment.canUseDOM` to be false. // Force `ExecutionEnvironment.canUseDOM` to be false.
if (GLOBAL.document) {
GLOBAL.document.createElement = null; GLOBAL.document.createElement = null;
} }
}
function handleErrorWithRedBox(e) { function handleErrorWithRedBox(e) {
var RKExceptionsManager = require('NativeModules').RKExceptionsManager; var RKExceptionsManager = require('NativeModules').RKExceptionsManager;