From a101fc768cedc7ac9754006e5b7292bb7084ab54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Fri, 8 Oct 2021 07:37:41 -0700 Subject: [PATCH] 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 --- Libraries/Core/setUpGlobals.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Libraries/Core/setUpGlobals.js b/Libraries/Core/setUpGlobals.js index a8ce63d1323..a571ba52b12 100644 --- a/Libraries/Core/setUpGlobals.js +++ b/Libraries/Core/setUpGlobals.js @@ -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;