Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for existence of
global
before usage (#3646)
Summary: An unchecked usage of `global` is causing failures in environments where it may not be polyfilled (see vercel/next.js#30968). This is fixed by adding a check for `global` in the same fashion [`registerEnvironmentWithDevTools.js`](https://github.com/facebook/relay/blob/87696f9cbf61739cb7474be447cf1d88e6eec0c8/packages/relay-runtime/util/registerEnvironmentWithDevTools.js#L21-L26) already does. The tests seem to still run fine after this, and the compiled code still references `global` so it should be a safe change 😄 Pull Request resolved: #3646 Reviewed By: josephsavona Differential Revision: D32997065 Pulled By: alunyov fbshipit-source-id: 1c3b8d0e5348b2d6b5b5c2ea56f2d903f84a8fcf
- Loading branch information