From 61b8d812a4aad6015f67b495bac6ac7225c20e7d Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:59:14 +0100 Subject: [PATCH] refactor(ses): tame fn constructors try/catch condition for Hermes --- packages/ses/src/tame-function-constructors.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/ses/src/tame-function-constructors.js b/packages/ses/src/tame-function-constructors.js index 01e7be5a8e..8d26ee0f28 100644 --- a/packages/ses/src/tame-function-constructors.js +++ b/packages/ses/src/tame-function-constructors.js @@ -128,9 +128,7 @@ export default function tameFunctionConstructors() { ); try { - new FERAL_FUNCTION( - 'return (async function* AsyncGeneratorFunctionInstance() {})', - )(); +new FERAL_FUNCTION('async function* AsyncGeneratorFunctionInstance() {}')(); repairFunction( 'AsyncGeneratorFunction', '%InertAsyncGeneratorFunction%',