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:
Rubén Norte
2021-10-08 07:39:11 -07:00
committed by Facebook GitHub Bot
parent ec614c16b3
commit a101fc768c
-4
View File
@@ -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;