diff --git a/packages/ses/src/commons.js b/packages/ses/src/commons.js index 564b93cf13..d72fe27790 100644 --- a/packages/ses/src/commons.js +++ b/packages/ses/src/commons.js @@ -362,15 +362,14 @@ export const FERAL_STACK_GETTER = feralStackGetter; export const FERAL_STACK_SETTER = feralStackSetter; // Test for async generator function syntax support. -// eslint-disable-next-line import/no-mutable-exports -let AsyncGeneratorFunctionInstance; +let AsyncGeneratorNewFunctionInstance; try { // Wrapping one in an new Function lets the `hermesc` binary file // parse the Metro js bundle without SyntaxError, to generate the // optimised Hermes bytecode bundle, when `gradlew` is called to // assemble the release build APK for React Native prod Android apps. // Delaying the error until runtime lets us customise lockdown behaviour. - AsyncGeneratorFunctionInstance = new FERAL_FUNCTION( + AsyncGeneratorNewFunctionInstance = new FERAL_FUNCTION( 'return (async function* AsyncGeneratorFunctionInstance() {})', )(); } catch (e) { @@ -382,4 +381,4 @@ try { throw e; } } -export { AsyncGeneratorFunctionInstance }; +export const AsyncGeneratorFunctionInstance = AsyncGeneratorNewFunctionInstance;