mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-30 22:48:23 +08:00
React Native: Remove Unnecessary document.body Shim
This commit is contained in:
@@ -51,13 +51,10 @@ function setupDocumentShim() {
|
||||
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.
|
||||
GLOBAL.document.createElement = null;
|
||||
if (GLOBAL.document) {
|
||||
GLOBAL.document.createElement = null;
|
||||
}
|
||||
}
|
||||
|
||||
function handleErrorWithRedBox(e) {
|
||||
|
||||
Reference in New Issue
Block a user