diff --git a/Libraries/Core/InitializeCore.js b/Libraries/Core/InitializeCore.js index c55163981c8e4b..64af03b6b702e2 100644 --- a/Libraries/Core/InitializeCore.js +++ b/Libraries/Core/InitializeCore.js @@ -91,8 +91,10 @@ polyfillGlobal('regeneratorRuntime', () => { // The require just sets up the global, so make sure when we first // invoke it the global does not exist delete global.regeneratorRuntime; - require('regenerator-runtime/runtime'); - return global.regeneratorRuntime; + + // regenerator-runtime/runtime exports the regeneratorRuntime object, so we + // can return it safely. + return require('regenerator-runtime/runtime'); }); // Set up timers