Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: The old whatwg-fetch module doesn't actually export anything, so we would always hit the `else` condition. The new whatwg-fetch (3.0.0, introduced in facebook#24418) now exports an ES module. As a result, `whatwg` and `whatwg.fetch` are both truthy but the `module.exports` will end up empty. This breaks the RN fetch module. This will switch the behavior back to the expected polyfill behavior (calling `require('whatwg-fetch')` and allowing it to polyfill fetch in global scope). The RN fetch module will re-export these globals. Reviewed By: cpojer Differential Revision: D15639851 fbshipit-source-id: ebd8bce85f7797d8539f53982e515ac47f6425e7
- Loading branch information