mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove unnecessary global variable named GLOBAL
Summary: We are defining an alias for the global variable in React Native called `GLOBAL`, which is not used at all at Facebook and it doesn't seem it's used externally either. This alias is not standard nor common in the JS ecosystem, so we can just remove it to reduce the pollution of the global scope. Changelog: [General][Removed] - Removed unnecessary global variable `GLOBAL`. Reviewed By: yungsters Differential Revision: D31472154 fbshipit-source-id: 127c3264848b638f85fb2e39e17ed2006372d2dd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ec614c16b3
commit
a101fc768c
@@ -14,10 +14,6 @@
|
||||
* Sets up global variables for React Native.
|
||||
* You can use this module directly, or just require InitializeCore.
|
||||
*/
|
||||
if (global.GLOBAL === undefined) {
|
||||
global.GLOBAL = global;
|
||||
}
|
||||
|
||||
if (global.window === undefined) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
global.window = global;
|
||||
|
||||
Reference in New Issue
Block a user