mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 00:20:31 +00:00
Move Map/Set polyfills to top
Summary: Moves initialization of `Map` and `Set` polyfills to the top of `InitializeCore` to avoid problems with JSC versions that don’t accept (or silently ignore) iterables as constructor arguments. Reviewed By: mjesun Differential Revision: D6185632 fbshipit-source-id: 3abe4baeb3a08c328d8c6b3bb1b2e01716c2c95c
This commit is contained in:
parent
a5550a56ea
commit
008e549933
@ -38,6 +38,15 @@ if (global.window === undefined) {
|
||||
|
||||
const defineLazyObjectProperty = require('defineLazyObjectProperty');
|
||||
|
||||
// Set up collections
|
||||
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
|
||||
if (_shouldPolyfillCollection('Map')) {
|
||||
polyfillGlobal('Map', () => require('Map'));
|
||||
}
|
||||
if (_shouldPolyfillCollection('Set')) {
|
||||
polyfillGlobal('Set', () => require('Set'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an object's property. If a property with the same name exists, this will
|
||||
* replace it but maintain its descriptor configuration. The property will be
|
||||
@ -120,15 +129,6 @@ if (!global.__fbDisableExceptionsManager) {
|
||||
const ReactNativeVersionCheck = require('ReactNativeVersionCheck');
|
||||
ReactNativeVersionCheck.checkVersions();
|
||||
|
||||
// Set up collections
|
||||
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
|
||||
if (_shouldPolyfillCollection('Map')) {
|
||||
polyfillGlobal('Map', () => require('Map'));
|
||||
}
|
||||
if (_shouldPolyfillCollection('Set')) {
|
||||
polyfillGlobal('Set', () => require('Set'));
|
||||
}
|
||||
|
||||
// Set up Promise
|
||||
// The native Promise implementation throws the following error:
|
||||
// ERROR: Event loop not supported.
|
||||
|
Loading…
x
Reference in New Issue
Block a user