From 918c05179ee3f9d3403099d3df86f1e5805d05b1 Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:14:22 +0000 Subject: [PATCH] feat(ses): support CSP in commons AsyncGeneratorFunctionInstance --- packages/ses/src/commons.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ses/src/commons.js b/packages/ses/src/commons.js index c9126978b4..83cac8b2b2 100644 --- a/packages/ses/src/commons.js +++ b/packages/ses/src/commons.js @@ -403,6 +403,9 @@ const getAsyncGeneratorFunctionInstance = () => { // However React Native provides a `console` implementation when setting up error handling: // https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/InitializeCore.js return undefined; + } else if (error.name === 'EvalError') { + // eslint-disable-next-line no-empty-function + return async function* AsyncGeneratorFunctionInstance() {}; } else { throw error; }