Skip to content

Commit a101fc7

Browse files
rubennortefacebook-github-bot
authored andcommitted
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
1 parent ec614c1 commit a101fc7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Libraries/Core/setUpGlobals.js

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* Sets up global variables for React Native.
1515
* You can use this module directly, or just require InitializeCore.
1616
*/
17-
if (global.GLOBAL === undefined) {
18-
global.GLOBAL = global;
19-
}
20-
2117
if (global.window === undefined) {
2218
// $FlowFixMe[cannot-write]
2319
global.window = global;

0 commit comments

Comments
 (0)