Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/react-native/Libraries/Core/polyfillPromise.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@

'use strict';

const {polyfillGlobal} = require('../Utilities/PolyfillFunctions');

/**
* Set up Promise. The native Promise implementation throws the following error:
* ERROR: Event loop not supported.
* Set up Promise. The engines React Native supports ship a native Promise, so
* it is no longer polyfilled here.
*
* If you don't need these polyfills, don't use InitializeCore; just directly
* require the modules you need from InitializeCore for setup.
Expand All @@ -33,6 +31,4 @@ if (global?.HermesInternal?.hasPromise?.()) {
require('../promiseRejectionTrackingOptions').default,
);
}
} else {
polyfillGlobal('Promise', () => require('../Promise').default);
}
Loading