mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 15:45:32 +00:00
React Native: Remove Unnecessary document.body
Shim
This commit is contained in:
parent
fd198b71dc
commit
45deae03af
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user